import{Z as g,i as h,r as m,c as d,o as u,a as n,b as o,d as V,F as _,j as w,n as r,t as b,w as x,e as y}from"./app-BhD6J0Va.js";import{I as C}from"./moment-DeOISj6Y.js";import{L as k}from"./Layout-BNWXhjq5.js";import{P as T}from"./Pagination-KBt07-7T.js";import{T as L}from"./TextInput-CRQDtFka.js";import{S as U}from"./SelectInput-Cao9wiYo.js";import{L as I}from"./LoadingButton-BKJMdZnQ.js";import{T as S}from"./TextareaInput-CESzil30.js";import{_ as E}from"./FlashMessages-DW2Y2mP0.js";import"./v4-SoommWqA.js";const B={metaInfo:{title:"Contact"},components:{Icon:C,Link:h,Head:g,Pagination:T,TextInput:L,SelectInput:U,LoadingButton:I,TextareaInput:S},layout:k,props:{page:Object},remember:"form",data(){return{tabs:[{name:"Content",active:!0},{name:"Location",active:!1},{name:"Phone",active:!1},{name:"Email",active:!1},{name:"Contact Form",active:!1}],form:this.$inertia.form({title:"Contact",slug:"contact",is_active:this.page.is_active,html:JSON.parse(this.page.html)})}},methods:{update(){this.form.put(this.route("front_pages.update","contact"))},activeTab(a){for(const t of this.tabs)t.active=!1;this.tabs[a].active=!0}}},N={class:"bg-white rounded-md shadow overflow-hidden mr-2"},P={class:"p-8 -mr-6 -mb-8 flex flex-wrap"},D={class:"w-full mx-auto"},F={class:"border-b border-gray-200 dark:border-gray-700 tab-head"},H={class:"flex flex-wrap -mb-px",id:"myTab","data-tabs-toggle":"#myTabContent",role:"tablist"},j=["onClick"],O={class:"tab-content"},z={class:"px-8 py-4 bg-gray-50 border-t border-gray-100 flex items-center"};function J(a,t,M,R,e,i){const f=m("Head"),s=m("text-input"),p=m("textarea-input"),v=m("loading-button");return u(),d("div",null,[n(f,{title:"Contact"}),o("div",N,[o("form",{onSubmit:t[9]||(t[9]=V((...l)=>i.update&&i.update(...l),["prevent"]))},[o("div",P,[o("div",D,[o("div",F,[o("ul",H,[(u(!0),d(_,null,w(e.tabs,(l,c)=>(u(),d("li",{class:"mr-2",role:"presentation",key:c},[o("div",{class:r(["inline-block text-gray-500 hover:text-gray-600 hover:border-gray-300 rounded-t-lg py-4 px-4 text-sm text-center border-transparent border-b-2 dark:text-gray-400 dark:hover:text-gray-300",{active:l.active}]),onClick:Z=>i.activeTab(c)},b(l.name),11,j)]))),128))])]),o("div",O,[o("div",{class:r(["p-4 t-content",{active:e.tabs[0].active}])},[n(s,{modelValue:e.form.html.content_text,"onUpdate:modelValue":t[0]||(t[0]=l=>e.form.html.content_text=l),class:"pr-6 pb-8 pt-5 w-full lg:w-1/3",label:a.$t("Text")},null,8,["modelValue","label"]),n(p,{name:"content",modelValue:e.form.html.content_details,"onUpdate:modelValue":t[1]||(t[1]=l=>e.form.html.content_details=l),class:"pr-6 pb-8 w-full",label:a.$t("Details")},null,8,["modelValue","label"])],2),o("div",{class:r(["p-4 t-content",{active:e.tabs[1].active}])},[n(s,{modelValue:e.form.html.location,"onUpdate:modelValue":t[2]||(t[2]=l=>e.form.html.location=l),class:"pr-6 pb-8 pt-5 w-full",label:a.$t("Location address")},null,8,["modelValue","label"]),n(s,{modelValue:e.form.html.location_map,"onUpdate:modelValue":t[3]||(t[3]=l=>e.form.html.location_map=l),class:"pr-6 pb-8 pt-5 w-full",label:a.$t("Location map")},null,8,["modelValue","label"])],2),o("div",{class:r(["p-4 t-content",{active:e.tabs[2].active}])},[n(s,{modelValue:e.form.html.phone,"onUpdate:modelValue":t[4]||(t[4]=l=>e.form.html.phone=l),class:"pr-6 pb-8 pt-5 w-full lg:w-1/3",label:a.$t("Phone number")},null,8,["modelValue","label"]),n(p,{name:"content",modelValue:e.form.html.phone_details,"onUpdate:modelValue":t[5]||(t[5]=l=>e.form.html.phone_details=l),class:"pr-6 pb-8 w-full",label:a.$t("Details")},null,8,["modelValue","label"])],2),o("div",{class:r(["p-4 t-content",{active:e.tabs[3].active}])},[n(s,{modelValue:e.form.html.email,"onUpdate:modelValue":t[6]||(t[6]=l=>e.form.html.email=l),class:"pr-6 pb-8 pt-5 w-full lg:w-1/3",label:a.$t("Email address")},null,8,["modelValue","label"]),n(p,{name:"content",modelValue:e.form.html.email_details,"onUpdate:modelValue":t[7]||(t[7]=l=>e.form.html.email_details=l),class:"pr-6 pb-8 w-full",label:a.$t("Email details")},null,8,["modelValue","label"])],2),o("div",{class:r(["p-4 t-content",{active:e.tabs[4].active}])},[n(s,{modelValue:e.form.html.contact_recipient,"onUpdate:modelValue":t[8]||(t[8]=l=>e.form.html.contact_recipient=l),class:"pr-6 pb-8 pt-5 w-full lg:w-1/3",label:a.$t("Recipient Email (for the contact form)")},null,8,["modelValue","label"])],2)])])]),o("div",z,[n(v,{loading:e.form.processing,class:"btn-indigo ml-auto",type:"submit"},{default:x(()=>[y(b(a.$t("Save")),1)]),_:1},8,["loading"])])],32)])])}const te=E(B,[["render",J]]);export{te as default};
