import{W as d,j as e}from"./BulkImageUpload-DGPbX05r.js";import{P as g}from"./Panel-CCKAj23D.js";import{I as p}from"./Input-CR3dcIBA.js";import"./bootstrap.esm-e_F80uXB.js";const b=r=>{const{data:x,setData:l,post:t,errors:a,clearErrors:n,progress:o,processing:i}=d({name:null,avatar:null});function m(s){s.preventDefault(),t("/upload-site-logo")}const c=s=>{l("logo",s.target.files[0]),n(s.target.name)};return e.jsx(g,{title:"Website Logo",md:"fw",className:"",children:e.jsxs("form",{className:"p-4",onSubmit:m,children:[o&&e.jsxs("progress",{value:o.percentage,max:"100",children:[o.percentage,"%"]}),e.jsx("div",{className:"row logo-panel mb-3",children:e.jsx("img",{src:r.logo,alt:""})}),e.jsxs("div",{className:"form-row row",children:[e.jsxs("div",{className:"col-md-9",children:[e.jsx(p,{type:"file",name:"logo",className:a.logo&&"inerror",handleChange:c}),a.logo&&e.jsx("div",{className:"smart-valid",children:a.logo})]}),e.jsx("div",{className:"col-md-3",children:e.jsx("button",{disabled:i,className:"btn w-100 btn-sm btn-primary",children:"Update Logo"})})]})]})})};export{b as default};
