import{W as h,j as e}from"./BulkImageUpload-DGPbX05r.js";import{P as x}from"./Panel-CCKAj23D.js";import{I as m}from"./Input-CR3dcIBA.js";import{S as j}from"./sweetalert2.all-CGGHY7K6.js";import"./bootstrap.esm-e_F80uXB.js";const f=l=>{const{data:r,setData:d,post:c,processing:o,errors:s,clearErrors:n,reset:N}=h({mobile_no_1:l.info.mobile_no_1,mobile_no_2:l.info.mobile_no_2,email_1:l.info.email_1,email_2:l.info.email_2,web:l.info.web,address:l.info.address}),i=a=>{d(a.target.name,a.target.type==="checkbox"?a.target.checked:a.target.value),n(a.target.name)},t=a=>{a.preventDefault(),c(route("update-contact-details"),{onSuccess:()=>{j.fire({heightAuto:!1,title:"Saved Sucessfully !",icon:"success"})}})};return e.jsx(x,{title:"Contact Details",md:"fw",className:"",children:e.jsxs("form",{className:"p-4",onSubmit:t,children:[e.jsxs("div",{className:"form-group row",children:[e.jsxs("div",{className:"col-sm-4",children:[e.jsx("label",{htmlFor:"",children:"Mobile Number 1"}),e.jsx("span",{className:"form-indicat",children:":"})]}),e.jsxs("div",{className:"col-md-8",children:[e.jsx(m,{type:"text",name:"mobile_no_1",value:r.mobile_no_1,placeholder:"Enter Mobile Number 1",className:s.mobile_no_1&&"inerror",handleChange:i}),s.mobile_no_1&&e.jsx("div",{className:"smart-valid",children:s.mobile_no_1})]})]}),e.jsxs("div",{className:"form-group row",children:[e.jsxs("div",{className:"col-sm-4",children:[e.jsx("label",{htmlFor:"",children:"Mobile Number 2"}),e.jsx("span",{className:"form-indicat",children:":"})]}),e.jsxs("div",{className:"col-md-8",children:[e.jsx(m,{type:"text",name:"mobile_no_2",value:r.mobile_no_2,placeholder:"Enter Mobile Number 2",className:s.mobile_no_2&&"inerror",handleChange:i}),s.mobile_no_2&&e.jsx("div",{className:"smart-valid",children:s.mobile_no_2})]})]}),e.jsxs("div",{className:"form-group row",children:[e.jsxs("div",{className:"col-sm-4",children:[e.jsx("label",{htmlFor:"",children:"Email Address 1"}),e.jsx("span",{className:"form-indicat",children:":"})]}),e.jsxs("div",{className:"col-md-8",children:[e.jsx(m,{type:"text",name:"email_1",value:r.email_1,placeholder:"Enter Email Address 1",className:s.email_1&&"inerror",handleChange:i}),s.email_1&&e.jsx("div",{className:"smart-valid",children:s.email_1})]})]}),e.jsxs("div",{className:"form-group row",children:[e.jsxs("div",{className:"col-sm-4",children:[e.jsx("label",{htmlFor:"",children:"Email Address 2"}),e.jsx("span",{className:"form-indicat",children:":"})]}),e.jsxs("div",{className:"col-md-8",children:[e.jsx(m,{type:"text",name:"email_2",value:r.email_2,placeholder:"Enter Email Address 2",className:s.email_2&&"inerror",handleChange:i}),s.email_2&&e.jsx("div",{className:"smart-valid",children:s.email_2})]})]}),e.jsxs("div",{className:"form-group row",children:[e.jsxs("div",{className:"col-sm-4",children:[e.jsx("label",{htmlFor:"",children:"Web Address"}),e.jsx("span",{className:"form-indicat",children:":"})]}),e.jsxs("div",{className:"col-md-8",children:[e.jsx(m,{type:"text",name:"web",value:r.web,placeholder:"ex: https://smarteyeapps.com",className:s.web&&"inerror",handleChange:i}),s.web&&e.jsx("div",{className:"smart-valid",children:s.web})]})]}),e.jsxs("div",{className:"form-group row",children:[e.jsxs("div",{className:"col-sm-4",children:[e.jsx("label",{htmlFor:"",children:"Address"}),e.jsx("span",{className:"form-indicat",children:":"})]}),e.jsxs("div",{className:"col-md-8",children:[e.jsx("textarea",{type:"text",name:"address",value:r.address,className:`form-control ${s.address&&"inerror"}`,onChange:i,placeholder:"Enter Full Address",children:" "}),s.address&&e.jsx("div",{className:"smart-valid",children:s.address})]})]}),e.jsxs("div",{className:"form-group row",children:[e.jsx("div",{className:"col-md-4"}),e.jsx("div",{className:"col-md-8 text-end",children:e.jsx("button",{disabled:o,className:"btn  btn-sm btn-primary",children:"Update Contact Details"})})]})]})})};export{f as default};
