import{W as h,j as s}from"./BulkImageUpload-DGPbX05r.js";import{P as x}from"./Panel-CCKAj23D.js";import{I as n}from"./Input-CR3dcIBA.js";import{S as j}from"./sweetalert2.all-CGGHY7K6.js";import"./bootstrap.esm-e_F80uXB.js";const g=l=>{const{data:i,setData:c,post:t,processing:d,errors:e,clearErrors:m,reset:N}=h({fb:l.info.fb,tw:l.info.tw,li:l.info.li,ins:l.info.ins,yt:l.info.yt,pin:l.info.pin}),r=a=>{c(a.target.name,a.target.type==="checkbox"?a.target.checked:a.target.value),m(a.target.name)},o=a=>{a.preventDefault(),t(route("update-social-links"),{onSuccess:()=>{j.fire({heightAuto:!1,title:"Saved Sucessfully !",icon:"success"})}})};return s.jsx(x,{title:"Social Links",md:"fw",className:"",children:s.jsxs("form",{className:"p-4",onSubmit:o,children:[s.jsxs("div",{className:"form-group row",children:[s.jsxs("div",{className:"col-sm-4",children:[s.jsx("label",{htmlFor:"",children:"Facebook"}),s.jsx("span",{className:"form-indicat",children:":"})]}),s.jsxs("div",{className:"col-md-8",children:[s.jsx(n,{type:"text",name:"fb",value:i.fb,placeholder:"Enter Facebook link",className:e.fb&&"inerror",handleChange:r}),e.fb&&s.jsx("div",{className:"smart-valid",children:e.fb})]})]}),s.jsxs("div",{className:"form-group row",children:[s.jsxs("div",{className:"col-sm-4",children:[s.jsx("label",{htmlFor:"",children:"Twitter"}),s.jsx("span",{className:"form-indicat",children:":"})]}),s.jsxs("div",{className:"col-md-8",children:[s.jsx(n,{type:"text",name:"tw",value:i.tw,placeholder:"Enter Twitter Link",className:e.tw&&"inerror",handleChange:r}),e.tw&&s.jsx("div",{className:"smart-valid",children:e.tw})]})]}),s.jsxs("div",{className:"form-group row",children:[s.jsxs("div",{className:"col-sm-4",children:[s.jsx("label",{htmlFor:"",children:"LinkedIn"}),s.jsx("span",{className:"form-indicat",children:":"})]}),s.jsxs("div",{className:"col-md-8",children:[s.jsx(n,{type:"text",name:"li",value:i.li,placeholder:"Enter Linkedin Link",className:e.li&&"inerror",handleChange:r}),e.li&&s.jsx("div",{className:"smart-valid",children:e.li})]})]}),s.jsxs("div",{className:"form-group row",children:[s.jsxs("div",{className:"col-sm-4",children:[s.jsx("label",{htmlFor:"",children:"Instagram"}),s.jsx("span",{className:"form-indicat",children:":"})]}),s.jsxs("div",{className:"col-md-8",children:[s.jsx(n,{type:"text",name:"ins",value:i.ins,placeholder:"Enter Instagram Link",className:e.ins&&"inerror",handleChange:r}),e.ins&&s.jsx("div",{className:"smart-valid",children:e.ins})]})]}),s.jsxs("div",{className:"form-group row",children:[s.jsxs("div",{className:"col-sm-4",children:[s.jsx("label",{htmlFor:"",children:"Youtube"}),s.jsx("span",{className:"form-indicat",children:":"})]}),s.jsxs("div",{className:"col-md-8",children:[s.jsx(n,{type:"text",name:"yt",value:i.yt,placeholder:"Enter Youtube Link",className:e.yt&&"inerror",handleChange:r}),e.yt&&s.jsx("div",{className:"smart-valid",children:e.yt})]})]}),s.jsxs("div",{className:"form-group row",children:[s.jsxs("div",{className:"col-sm-4",children:[s.jsx("label",{htmlFor:"",children:"Pintrest"}),s.jsx("span",{className:"form-indicat",children:":"})]}),s.jsxs("div",{className:"col-md-8",children:[s.jsx(n,{type:"text",name:"pin",value:i.pin,placeholder:"Enter Pinterest Link",className:e.pin&&"inerror",handleChange:r}),e.pin&&s.jsx("div",{className:"smart-valid",children:e.pin})]})]}),s.jsxs("div",{className:"form-group row",children:[s.jsx("div",{className:"col-md-4"}),s.jsx("div",{className:"col-md-8 text-end",children:s.jsx("button",{disabled:d,className:"btn  btn-sm btn-primary",children:"Update Contact Details"})})]})]})})};export{g as default};
