import{W as n,j as e}from"./BulkImageUpload-DGPbX05r.js";import{P as d}from"./Panel-CCKAj23D.js";import{S as p}from"./sweetalert2.all-CGGHY7K6.js";import"./bootstrap.esm-e_F80uXB.js";const S=({err:u,success:g})=>{const{data:x,setData:r,post:l,put:f,processing:j,errors:a,clearErrors:t,reset:c}=n({category_id:"",image:""}),i=s=>{r(s.target.name,s.target.files),t(s.target.name)},m=s=>{s.preventDefault(),l(route("bulk-products-image"),{onSuccess:()=>{c(),p.fire("Saved Successfully!","","success")},preserveState:o=>Object.keys(o.props.errors).length})};return e.jsxs(d,{title:"Bulk Product Image Upload",md:"12",children:[e.jsx("div",{className:"p-3 text-center pb-0",children:e.jsx("p",{children:"Image name should be mentioned in excel file."})}),e.jsxs("form",{className:"p-4",onSubmit:m,children:[e.jsxs("div",{className:"form-group pt-2 row",children:[e.jsxs("div",{className:"col-sm-4",children:[e.jsx("label",{htmlFor:"",children:"Select Images"}),e.jsx("span",{className:"form-indicat",children:":"})]}),e.jsxs("div",{className:"col-sm-8 sticky",children:[e.jsx("input",{type:"file",multiple:!0,accept:"image/*",name:"image",className:"form-control",onChange:i}),a.image&&e.jsx("div",{className:"smart-valid",children:a.image})]})]}),e.jsxs("div",{className:"form-group  row",children:[e.jsx("div",{className:"col-sm-4"}),e.jsx("div",{className:"col-sm-8 sticky",children:e.jsx("button",{className:"btn fs-9 fw-bold  btn-primary",children:"Upload Image"})})]})]})]})};export{S as default};
