import{m as y,a3 as h,c as p,b as e,t as s,d as o,v as n,a as d,F as U,r as k,u as f,w as I,o as b}from"./app-13978987.js";import{_ as i}from"./ImageInput.vue_vue_type_script_setup_true_lang-4a03e2f5.js";import{_ as S}from"./SpinnerBtn-cb152833.js";import{u as T}from"./optionUpdate-b5f61f3c.js";const C={class:"mb-10 mt-2 rounded border p-3 dark:border-gray-600"},j={class:"mb-2"},B={class:"mb-2"},P={class:"mb-10 mt-2 rounded border p-3 dark:border-gray-600"},w={class:"mb-2"},$={class:"mb-2"},L={class:"mb-2"},M={class:"mb-2"},O={class:"mr-2"},x={class:"rounded-full border border-black p-2 py-1 text-center font-bold"},D={class:"flex flex-grow flex-col gap-1"},E=["onUpdate:modelValue"],F=["onUpdate:modelValue"],N=["onClick"],R={class:"mb-10 mt-2 rounded border p-3 dark:border-gray-600"},H={class:"mb-2"},J={class:"mb-2"},X={class:"mb-2"},Q={__name:"Career",props:["data"],setup(_){const l=y({..._.data}),v=T();l.value.socials||(l.value.socials={}),h(()=>{var t,a;["career_platform","career_header","career_jobs"].forEach(u=>l.value[u]=l.value[u]||{}),(a=(t=l.value.career_platform)==null?void 0:t.items)!=null&&a.length||(l.value.career_platform.items=[{...c}])});const c={title:"",body:""},g=()=>{l.value.career_platform.items.push({...c})},V=r=>{l.value.career_platform.items.splice(r,1)};return(r,t)=>(b(),p("form",{method:"POST",onSubmit:t[12]||(t[12]=I(a=>f(v).submit("career_page",l.value),["prevent"])),enctype:"multipart/form-data"},[e("h6",null,s(r.trans("Header section")),1),e("div",C,[e("div",j,[e("label",null,s(r.trans("Title")),1),o(e("input",{type:"text",class:"input","onUpdate:modelValue":t[0]||(t[0]=a=>l.value.career_header.title=a)},null,512),[[n,l.value.career_header.title]])]),e("div",B,[e("label",null,s(r.trans("Sub title")),1),o(e("input",{type:"text",class:"input","onUpdate:modelValue":t[1]||(t[1]=a=>l.value.career_header.sub_title=a)},null,512),[[n,l.value.career_header.sub_title]])]),d(i,{label:r.trans("Left Image"),modelValue:l.value.career_header.image1,"onUpdate:modelValue":t[2]||(t[2]=a=>l.value.career_header.image1=a),class:"mb-2"},null,8,["label","modelValue"]),d(i,{label:r.trans("Center Image"),modelValue:l.value.career_header.image2,"onUpdate:modelValue":t[3]||(t[3]=a=>l.value.career_header.image2=a),class:"mb-2"},null,8,["label","modelValue"]),d(i,{label:r.trans("Top Right Image"),modelValue:l.value.career_header.image3,"onUpdate:modelValue":t[4]||(t[4]=a=>l.value.career_header.image3=a),class:"mb-2"},null,8,["label","modelValue"]),d(i,{label:r.trans("Right Bottom Image"),modelValue:l.value.career_header.image4,"onUpdate:modelValue":t[5]||(t[5]=a=>l.value.career_header.image4=a),class:"mb-2"},null,8,["label","modelValue"])]),e("h6",null,s(r.trans("Our platform section")),1),e("div",P,[e("div",w,[e("label",null,s(r.trans("Top title")),1),o(e("input",{type:"text",class:"input","onUpdate:modelValue":t[6]||(t[6]=a=>l.value.career_platform.top_title=a)},null,512),[[n,l.value.career_platform.top_title]])]),e("div",$,[e("label",null,s(r.trans("Title")),1),o(e("input",{type:"text",class:"input","onUpdate:modelValue":t[7]||(t[7]=a=>l.value.career_platform.title=a)},null,512),[[n,l.value.career_platform.title]])]),e("div",L,[e("label",null,s(r.trans("Sub title")),1),o(e("input",{type:"text",class:"input","onUpdate:modelValue":t[8]||(t[8]=a=>l.value.career_platform.sub_title=a)},null,512),[[n,l.value.career_platform.sub_title]])]),d(i,{label:r.trans("Left Image"),modelValue:l.value.career_platform.image1,"onUpdate:modelValue":t[9]||(t[9]=a=>l.value.career_platform.image1=a),class:"mb-2"},null,8,["label","modelValue"]),e("div",M,[e("label",O,s(r.trans("Platform Items")),1),(b(!0),p(U,null,k(l.value.career_platform.items,(a,u)=>(b(),p("div",{class:"mb-2 flex items-center gap-x-2 rounded border p-2 dark:border-gray-600",key:u},[e("span",x,s(u+1),1),e("div",D,[o(e("input",{type:"text",class:"input",placeholder:"title","onUpdate:modelValue":m=>a.title=m},null,8,E),[[n,a.title]]),o(e("textarea",{class:"textarea","onUpdate:modelValue":m=>a.body=m,placeholder:"body"}," ",8,F),[[n,a.body]])]),e("button",{type:"button",onClick:m=>V(u),class:"btn btn-danger"}," X ",8,N)]))),128)),e("button",{type:"button",onClick:g,class:"btn btn-primary"},"+")])]),e("h6",null,s(r.trans("Jobs section")),1),e("div",R,[e("div",H,[e("label",null,s(r.trans("Title")),1),o(e("input",{type:"text",class:"input","onUpdate:modelValue":t[10]||(t[10]=a=>l.value.career_jobs.title=a)},null,512),[[n,l.value.career_jobs.title]])]),e("div",J,[e("label",null,s(r.trans("Sub title")),1),o(e("input",{type:"text",class:"input","onUpdate:modelValue":t[11]||(t[11]=a=>l.value.career_jobs.sub_title=a)},null,512),[[n,l.value.career_jobs.sub_title]])])]),e("div",X,[d(S,{processing:f(v).processing,"btn-text":r.trans("Save Changes")},null,8,["processing","btn-text"])])],32))}};export{Q as default};
