import{_ as D,q as M,u as E,p as z,r as V,c as n,o as d,a as e,t as o,C as B,K as u,k as i,h as m,L as c,n as p}from"./app-q0jdcHwC.js";const F="/build/assets/contact-us-jJ95yZzC.png",T={class:"main-container"},A={class:"max-w-7xl mx-auto py-6 md:py-8 lg:py-12"},P={class:"text-slate-950 text-lg sm:text-xl lg:text-3xl font-bold mb-2"},I={class:"text-slate-950 text-base sm:text-lg font-normal tracking-tight mb-7"},J={class:"grid grid-cols-1 sm2:grid-cols-2 md:grid-cols-3 gap-6"},K={class:"md:col-span-2 order-2 md:order-1"},L={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},O={class:"form-label mb-2"},W=["placeholder"],Z={key:0,class:"text-red-500 text-sm"},G={class:"form-label mb-2"},H=["placeholder"],Q={key:0,class:"text-red-500 text-sm"},R={class:"mt-4"},X={class:"form-label mb-2"},Y=["placeholder"],ee={key:0,class:"text-red-500 text-sm"},se={class:"mt-4"},te={class:"form-label mb-2"},ae=["placeholder"],le={key:0,class:"text-red-500 text-sm"},oe={class:"mt-4"},re={type:"submit",class:"bg-primary text-white px-6 py-4 rounded-lg w-[148px]"},ne={__name:"ContactUs",setup(de){const v=M(),b=E(),N=z(),t=V({name:"",phone:"",subject:"",message:""}),s=V({}),U=()=>{q(),t.value.name&&t.value.phone&&t.value.subject&&t.value.message&&axios.post("/support",t.value,{headers:{Authorization:N.token}}).then(l=>{v.success(l.data.message,{position:b.langDirection==="rtl"?"bottom-right":"bottom-left"}),t.value.name="",t.value.phone="",t.value.subject="",t.value.message="",s.value={}}).catch(l=>{s.value=l.response.data.errors,v.error(l.response.data.message,{position:b.langDirection==="rtl"?"bottom-right":"bottom-left"})})},q=()=>{t.value.name||(s.value.name=["Name is required."]),t.value.phone||(s.value.phone=["Phone number is required."]),t.value.subject||(s.value.subject=["Subject is required."]),t.value.message||(s.value.message=["Message is required."])};return(l,a)=>{var g,h,f,x,_,y,j,$,k,w,S,C;return d(),n("div",T,[e("div",A,[e("div",P,o(l.$t("Can't find the answer you are looking for"))+"? ",1),e("div",I,o(l.$t("Our friendly assistant is here to assist you 24 hours a day"))+"! ",1),e("form",{onSubmit:a[4]||(a[4]=B(r=>U(),["prevent"]))},[e("div",J,[e("div",K,[e("div",L,[e("div",null,[e("label",O,[m(o(l.$t("Full Name"))+" ",1),a[5]||(a[5]=e("small",{class:"text-red-500"},"*",-1))]),u(e("input",{type:"text",placeholder:l.$t("Enter full name"),class:p(["form-input",s.value&&((g=s.value)!=null&&g.name)?"border-red-500":"border-slate-200"]),"onUpdate:modelValue":a[0]||(a[0]=r=>t.value.name=r)},null,10,W),[[c,t.value.name]]),s.value&&((h=s.value)!=null&&h.name)?(d(),n("span",Z,o((f=s.value)==null?void 0:f.name[0]),1)):i("",!0)]),e("div",null,[e("label",G,[m(o(l.$t("Phone Number"))+" ",1),a[6]||(a[6]=e("small",{class:"text-red-500"},"*",-1))]),u(e("input",{type:"text",placeholder:l.$t("Enter phone number"),class:p(["form-input",s.value&&((x=s.value)!=null&&x.phone)?"border-red-500":"border-slate-200"]),"onUpdate:modelValue":a[1]||(a[1]=r=>t.value.phone=r)},null,10,H),[[c,t.value.phone]]),s.value&&((_=s.value)!=null&&_.phone)?(d(),n("span",Q,o((y=s.value)==null?void 0:y.phone[0]),1)):i("",!0)])]),e("div",R,[e("label",X,[m(o(l.$t("Subject"))+" ",1),a[7]||(a[7]=e("small",{class:"text-red-500"},"*",-1))]),u(e("input",{type:"text",placeholder:l.$t("Enter subject line"),class:p(["form-input",s.value&&((j=s.value)!=null&&j.subject)?"border-red-500":"border-slate-200"]),"onUpdate:modelValue":a[2]||(a[2]=r=>t.value.subject=r)},null,10,Y),[[c,t.value.subject]]),s.value&&(($=s.value)!=null&&$.subject)?(d(),n("span",ee,o((k=s.value)==null?void 0:k.subject[0]),1)):i("",!0)]),e("div",se,[e("label",te,[m(o(l.$t("Message"))+" ",1),a[8]||(a[8]=e("small",{class:"text-red-500"},"*",-1))]),u(e("textarea",{rows:"4",placeholder:l.$t("Write your message")+" ...",class:p(["form-input",s.value&&((w=s.value)!=null&&w.message)?"border-red-500":"border-slate-200"]),"onUpdate:modelValue":a[3]||(a[3]=r=>t.value.message=r)},null,10,ae),[[c,t.value.message]]),s.value&&((S=s.value)!=null&&S.message)?(d(),n("span",le,o((C=s.value)==null?void 0:C.message[0]),1)):i("",!0)]),e("div",oe,[e("button",re,o(l.$t("Send")),1)])]),a[9]||(a[9]=e("div",{class:"col-span-1 items-center order-1 lg:order-2"},[e("div",{class:"lg:max-w-[450px] lg:max-h-[450px] rounded-2xl overflow-hidden"},[e("img",{src:F,alt:"image",class:"w-full h-full object-cover"})])],-1))])],32)])])}}},ie=D(ne,[["__scopeId","data-v-f9dd303b"]]);export{ie as default};
