import{_ as U,a as S,b as x,c as k}from"./BfPjfeWt.js";import{u as B,c as b,b as m,a as e,t as n,e as l,f as E,g as r,h as i,j as N,n as A,i as C,k as M,l as _,o as f}from"./BKiFavna.js";import{u as P}from"./BZ7f31ti.js";import{u as q}from"./DKzHUNYh.js";import{u as D}from"./BOqT4ZDK.js";import{_ as $}from"./DlAUqK2U.js";import"./DxB0DKYp.js";const j={"data-theme":"light"},H={id:"main-content",role:"main"},I={class:"form-wrap"},z={class:"form-container"},F={class:"form-row"},O={class:"form-group"},W={class:"form-group"},G={class:"form-row"},J={class:"form-group"},K={class:"form-group"},L={class:"form-row"},Q={class:"form-group"},R={class:"form-group"},X={class:"form-group"},Y={class:"form-group"},Z=["disabled"],ee={__name:"advertise",setup(oe){const{lang:a}=B(),{api:g}=P(),v=q(),o=M({company:"",contact_person:"",email:"",phone:"",ad_type:"banner",budget:"",duration:"",message:""}),p=_(!1),u=_(""),c=_("success"),y=async()=>{p.value=!0,u.value="";try{const d=await g.post("/advertise",o);u.value=d.data.message,c.value="success",v.success(d.data.message),Object.keys(o).forEach(s=>o[s]=""),o.ad_type="banner"}catch(d){u.value=d.message||"Error",c.value="error",v.error(d.message||"Error")}finally{p.value=!1}};return D({title:a.value==="bn"?"বিজ্ঞাপন":"Advertise"}),(d,s)=>{const h=U,V=S,w=x,T=k;return f(),b("div",j,[m(h),m(V),m(w),e("main",H,[e("div",I,[e("div",z,[e("h1",null,n(l(a)==="bn"?"বিজ্ঞাপন দিন":"Advertise With Us"),1),e("form",{onSubmit:E(y,["prevent"])},[e("div",F,[e("div",O,[e("label",null,n(l(a)==="bn"?"প্রতিষ্ঠানের নাম":"Company")+" *",1),r(e("input",{"onUpdate:modelValue":s[0]||(s[0]=t=>o.company=t),required:""},null,512),[[i,o.company]])]),e("div",W,[e("label",null,n(l(a)==="bn"?"যোগাযোগ ব্যক্তি":"Contact Person")+" *",1),r(e("input",{"onUpdate:modelValue":s[1]||(s[1]=t=>o.contact_person=t),required:""},null,512),[[i,o.contact_person]])])]),e("div",G,[e("div",J,[e("label",null,n(l(a)==="bn"?"ইমেইল":"Email")+" *",1),r(e("input",{"onUpdate:modelValue":s[2]||(s[2]=t=>o.email=t),type:"email",required:""},null,512),[[i,o.email]])]),e("div",K,[e("label",null,n(l(a)==="bn"?"ফোন":"Phone"),1),r(e("input",{"onUpdate:modelValue":s[3]||(s[3]=t=>o.phone=t),type:"tel"},null,512),[[i,o.phone]])])]),e("div",L,[e("div",Q,[e("label",null,n(l(a)==="bn"?"বিজ্ঞাপনের ধরন":"Ad Type"),1),r(e("select",{"onUpdate:modelValue":s[4]||(s[4]=t=>o.ad_type=t)},[...s[8]||(s[8]=[e("option",{value:"banner"},"Banner",-1),e("option",{value:"sidebar"},"Sidebar",-1),e("option",{value:"popup"},"Popup",-1),e("option",{value:"sponsored"},"Sponsored Post",-1)])],512),[[N,o.ad_type]])]),e("div",R,[e("label",null,n(l(a)==="bn"?"বাজেট":"Budget"),1),r(e("input",{"onUpdate:modelValue":s[5]||(s[5]=t=>o.budget=t)},null,512),[[i,o.budget]])])]),e("div",X,[e("label",null,n(l(a)==="bn"?"সময়কাল":"Duration"),1),r(e("input",{"onUpdate:modelValue":s[6]||(s[6]=t=>o.duration=t)},null,512),[[i,o.duration]])]),e("div",Y,[e("label",null,n(l(a)==="bn"?"বার্তা":"Message"),1),r(e("textarea",{"onUpdate:modelValue":s[7]||(s[7]=t=>o.message=t),rows:"4"},null,512),[[i,o.message]])]),u.value?(f(),b("p",{key:0,class:A(["msg",c.value])},n(u.value),3)):C("",!0),e("button",{disabled:p.value,class:"submit-btn"},n(p.value?"Sending...":l(a)==="bn"?"পাঠান":"Submit"),9,Z)],32)])])]),m(T)])}}},de=$(ee,[["__scopeId","data-v-a467fed0"]]);export{de as default};
