import{l as c,m as f,c as b,a as r,b as s,w as p,t as a,d as i,v as u,y as v,g,o as y,O as k,q as h}from"./app-13978987.js";import{_ as w}from"./AdminLayout-bd13ff9d.js";import{_ as V}from"./PageHeader-8c638686.js";import{_ as M}from"./SpinnerBtn-cb152833.js";import"./dropdown-45d66330.js";const U={class:"container flex-grow p-4 sm:p-6"},E={class:"space-y-6"},P={class:"grid grid-cols-12"},T={class:"col-span-5"},q={class:"col-span-7"},S={class:"card"},B={class:"card-body"},C={class:"mb-2"},D={class:"mb-2"},N={class:"mb-2"},O={class:"mb-2"},$={class:"mb-2"},F={class:"mb-2"},I={class:"mb-2"},j={class:"mb-2"},x={class:"mb-2"},L={for:"toggle-status",class:"toggle toggle-sm"},z=s("div",{class:"toggle-body"},null,-1),A={class:"label label-md"},G={class:"mt-2"},H=g({layout:w}),X=Object.assign(H,{__name:"Edit",props:["buttons","segments","info","socials"],setup(e){const o=e;c(()=>{o.info.status=o.info.status==1});const d=f(!1),m=()=>{o.info.preview.value instanceof File||(o.info.preview.value=null),d.value=!0,k.post(route("admin.team.update",o.info.id),{_method:"patch",team:o.info,socials:o.socials},{onSuccess:()=>{d.value=!1,h.success(trans("Team has been updated successfully"))}})};return(n,t)=>(y(),b("main",U,[r(V,{title:"Edit Team Member",buttons:e.buttons},null,8,["buttons"]),s("div",E,[s("form",{method:"post",onSubmit:p(m,["prevent"]),enctype:"multipart/form-data"},[s("div",P,[s("div",T,[s("strong",null,a(n.trans("Edit team member")),1),s("p",null,a(n.trans("Edit your team member details and necessary information from here")),1)]),s("div",q,[s("div",S,[s("div",B,[s("div",C,[s("label",null,a(n.trans("Member Name")),1),i(s("input",{type:"text",name:"member_name","onUpdate:modelValue":t[0]||(t[0]=l=>e.info.title=l),required:"",class:"input"},null,512),[[u,e.info.title]])]),s("div",D,[s("label",null,a(n.trans("Member Position")),1),i(s("input",{type:"text",name:"member_position","onUpdate:modelValue":t[1]||(t[1]=l=>e.info.slug=l),required:"",class:"input"},null,512),[[u,e.info.slug]])]),s("div",N,[s("label",null,a(n.trans("Profile Picture")),1),s("input",{onInput:t[2]||(t[2]=l=>e.info.preview.value=l.target.files[0]),type:"file",accept:"image/*",name:"profile_picture",class:"input"},null,32)]),s("div",O,[s("label",null,a(n.trans("Profile Description")),1),i(s("textarea",{class:"textarea h-200",name:"about",maxlength:"1000",required:"","onUpdate:modelValue":t[3]||(t[3]=l=>e.info.description.value=l)},null,512),[[u,e.info.description.value]])]),s("div",$,[s("label",null,a(n.trans("Facebook profile link")),1),i(s("input",{type:"url",name:"socials[facebook]","onUpdate:modelValue":t[4]||(t[4]=l=>e.socials.facebook=l),class:"input"},null,512),[[u,e.socials.facebook]])]),s("div",F,[s("label",null,a(n.trans("Twitter profile link")),1),i(s("input",{type:"url",name:"socials[twitter]","onUpdate:modelValue":t[5]||(t[5]=l=>e.socials.twitter=l),class:"input"},null,512),[[u,e.socials.twitter]])]),s("div",I,[s("label",null,a(n.trans("Linkedin profile link")),1),i(s("input",{type:"url",name:"socials[linkedin]","onUpdate:modelValue":t[6]||(t[6]=l=>e.socials.linkedin=l),class:"input"},null,512),[[u,e.socials.linkedin]])]),s("div",j,[s("label",null,a(n.trans("Instagram profile link")),1),i(s("input",{type:"url",name:"socials[instagram]","onUpdate:modelValue":t[7]||(t[7]=l=>e.socials.instagram=l),class:"input"},null,512),[[u,e.socials.instagram]])]),s("div",x,[s("label",L,[i(s("input",{"onUpdate:modelValue":t[8]||(t[8]=l=>e.info.status=l),class:"toggle-input peer sr-only",id:"toggle-status",type:"checkbox"},null,512),[[v,e.info.status]]),z,s("span",A,a(n.trans("Make it publish?")),1)])]),s("div",G,[r(M,{"btn-text":n.trans("Save Changes"),processing:d.value},null,8,["btn-text","processing"])])])])])])],32)])]))}});export{X as default};
