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