import{_ as U,a as j,b as C,c as E}from"./BfPjfeWt.js";import{u as $,p as q,c as l,b as h,a as t,t as o,e as r,f as A,g as _,h as m,i as u,k as B,l as g,m as D,o as i}from"./BKiFavna.js";import{u as I}from"./BZ7f31ti.js";import{u as H}from"./DKzHUNYh.js";import{u as F}from"./BYRNlgE9.js";import{u as P}from"./BOqT4ZDK.js";import{_ as z}from"./DlAUqK2U.js";import"./DxB0DKYp.js";const G={"data-theme":"light"},J={id:"main-content",role:"main"},K={class:"contact-wrap"},L={class:"contact-container"},O={class:"contact-title"},Q={class:"contact-grid"},R={class:"contact-form-box"},W={class:"form-row"},X={class:"form-group"},Y={class:"form-group"},Z={class:"form-row"},tt={class:"form-group"},et={class:"form-group"},st={class:"form-group"},at={key:0,class:"success-msg"},ot={key:1,class:"error-msg"},nt=["disabled"],lt={class:"contact-info"},it={key:0,class:"info-row"},rt=["href"],ut={key:1,class:"info-row"},ct={key:2,class:"info-row"},dt={key:3,class:"social-icons"},_t=["href"],mt=["href"],ft=["href"],pt=["href"],vt={__name:"contact",async setup(bt){let f,y;const{lang:n}=$(),{api:k}=I(),w=H(),a=B({name:"",email:"",phone:"",subject:"",message:""}),p=g(!1),v=g(""),b=g(""),{data:x}=([f,y]=q(()=>F("settings-contact",()=>k.get("/settings").catch(()=>({data:{settings:{}}})))),f=await f,y(),f),s=D(()=>x.value?.data?.settings||{}),V=async()=>{p.value=!0,v.value="",b.value="";try{const d=await k.post("/contact",a);v.value=d.data.message,w.success(d.data.message),a.name=a.email=a.phone=a.subject=a.message=""}catch(d){b.value=d.message||"Error",w.error(d.message||"Error")}finally{p.value=!1}};return P({title:n.value==="bn"?"যোগাযোগ":"Contact"}),(d,e)=>{const T=U,M=j,N=C,S=E;return i(),l("div",G,[h(T),h(M),h(N),t("main",J,[t("div",K,[t("div",L,[t("h1",O,o(r(n)==="bn"?"যোগাযোগ করুন":"Contact Us"),1),t("div",Q,[t("div",R,[t("h2",null,o(r(n)==="bn"?"বার্তা পাঠান":"Send a Message"),1),t("form",{onSubmit:A(V,["prevent"])},[t("div",W,[t("div",X,[t("label",null,o(r(n)==="bn"?"নাম":"Name")+" *",1),_(t("input",{"onUpdate:modelValue":e[0]||(e[0]=c=>a.name=c),type:"text",required:""},null,512),[[m,a.name]])]),t("div",Y,[t("label",null,o(r(n)==="bn"?"ইমেইল":"Email")+" *",1),_(t("input",{"onUpdate:modelValue":e[1]||(e[1]=c=>a.email=c),type:"email",required:""},null,512),[[m,a.email]])])]),t("div",Z,[t("div",tt,[t("label",null,o(r(n)==="bn"?"ফোন":"Phone"),1),_(t("input",{"onUpdate:modelValue":e[2]||(e[2]=c=>a.phone=c),type:"tel"},null,512),[[m,a.phone]])]),t("div",et,[t("label",null,o(r(n)==="bn"?"বিষয়":"Subject"),1),_(t("input",{"onUpdate:modelValue":e[3]||(e[3]=c=>a.subject=c),type:"text"},null,512),[[m,a.subject]])])]),t("div",st,[t("label",null,o(r(n)==="bn"?"বার্তা":"Message")+" *",1),_(t("textarea",{"onUpdate:modelValue":e[4]||(e[4]=c=>a.message=c),rows:"5",required:""},null,512),[[m,a.message]])]),v.value?(i(),l("p",at,o(v.value),1)):u("",!0),b.value?(i(),l("p",ot,o(b.value),1)):u("",!0),t("button",{type:"submit",disabled:p.value,class:"submit-btn"},o(p.value?r(n)==="bn"?"পাঠানো হচ্ছে...":"Sending...":r(n)==="bn"?"পাঠান":"Send"),9,nt)],32)]),t("aside",lt,[t("h3",null,o(r(n)==="bn"?"যোগাযোগের তথ্য":"Contact Info"),1),s.value.contact_email?(i(),l("div",it,[e[5]||(e[5]=t("i",{class:"fas fa-envelope"},null,-1)),t("a",{href:`mailto:${s.value.contact_email}`},o(s.value.contact_email),9,rt)])):u("",!0),s.value.contact_phone?(i(),l("div",ut,[e[6]||(e[6]=t("i",{class:"fas fa-phone"},null,-1)),t("span",null,o(s.value.contact_phone),1)])):u("",!0),s.value.contact_address?(i(),l("div",ct,[e[7]||(e[7]=t("i",{class:"fas fa-map-marker-alt"},null,-1)),t("span",null,o(s.value.contact_address),1)])):u("",!0),s.value.fb_url||s.value.twitter_url?(i(),l("div",dt,[s.value.fb_url?(i(),l("a",{key:0,href:s.value.fb_url,target:"_blank"},[...e[8]||(e[8]=[t("i",{class:"fab fa-facebook"},null,-1)])],8,_t)):u("",!0),s.value.twitter_url?(i(),l("a",{key:1,href:s.value.twitter_url,target:"_blank"},[...e[9]||(e[9]=[t("i",{class:"fab fa-twitter"},null,-1)])],8,mt)):u("",!0),s.value.youtube_url?(i(),l("a",{key:2,href:s.value.youtube_url,target:"_blank"},[...e[10]||(e[10]=[t("i",{class:"fab fa-youtube"},null,-1)])],8,ft)):u("",!0),s.value.linkedin_url?(i(),l("a",{key:3,href:s.value.linkedin_url,target:"_blank"},[...e[11]||(e[11]=[t("i",{class:"fab fa-linkedin"},null,-1)])],8,pt)):u("",!0)])):u("",!0)])])])])]),h(S)])}}},Mt=z(vt,[["__scopeId","data-v-a336dd76"]]);export{Mt as default};
