import{_ as V,a as k,b as C,c as A}from"./BfPjfeWt.js";import{_ as R}from"./DxB0DKYp.js";import{u as U,E as q,c as _,b as i,a as e,t as o,e as s,f as B,g as c,h as d,i as E,d as p,w as M,k as S,l as f,o as h}from"./BKiFavna.js";import{u as $}from"./BZ7f31ti.js";import{u as D}from"./DKzHUNYh.js";import{u as H}from"./BOqT4ZDK.js";import{_ as I}from"./DlAUqK2U.js";const L={"data-theme":"light"},P={id:"main-content",role:"main"},F={class:"auth-container"},j={class:"auth-box"},z={class:"auth-title"},G={class:"auth-subtitle"},J={class:"form-group"},K={class:"form-group"},O={class:"form-group"},Q={class:"form-group"},W={key:0,class:"error-msg"},X=["disabled"],Y={class:"auth-footer"},Z={__name:"register",setup(ee){D();const{lang:t}=U(),{register:b}=$(),v=q(),a=S({name:"",email:"",phone:"",password:""}),r=f(!1),u=f(""),g=async()=>{r.value=!0,u.value="";try{await b({...a}),v.push("/")}catch(m){u.value=m.message||(t.value==="bn"?"রেজিস্ট্রেশন ব্যর্থ":"Registration failed")}finally{r.value=!1}};return H({title:"Register"}),(m,n)=>{const w=V,x=k,y=C,N=R,T=A;return h(),_("div",L,[i(w),i(x),i(y),e("main",P,[e("div",F,[e("div",j,[e("h1",z,o(s(t)==="bn"?"রেজিস্টার করুন":"Create Account"),1),e("p",G,o(s(t)==="bn"?"নতুন অ্যাকাউন্ট খুলুন":"Sign up for a new account"),1),e("form",{onSubmit:B(g,["prevent"]),class:"auth-form"},[e("div",J,[e("label",null,o(s(t)==="bn"?"নাম":"Name"),1),c(e("input",{"onUpdate:modelValue":n[0]||(n[0]=l=>a.name=l),type:"text",required:""},null,512),[[d,a.name]])]),e("div",K,[e("label",null,o(s(t)==="bn"?"ইমেইল":"Email"),1),c(e("input",{"onUpdate:modelValue":n[1]||(n[1]=l=>a.email=l),type:"email",required:""},null,512),[[d,a.email]])]),e("div",O,[e("label",null,o(s(t)==="bn"?"ফোন (ঐচ্ছিক)":"Phone (optional)"),1),c(e("input",{"onUpdate:modelValue":n[2]||(n[2]=l=>a.phone=l),type:"tel"},null,512),[[d,a.phone]])]),e("div",Q,[e("label",null,o(s(t)==="bn"?"পাসওয়ার্ড":"Password"),1),c(e("input",{"onUpdate:modelValue":n[3]||(n[3]=l=>a.password=l),type:"password",required:"",minlength:"8"},null,512),[[d,a.password]])]),u.value?(h(),_("p",W,o(u.value),1)):E("",!0),e("button",{type:"submit",disabled:r.value,class:"auth-btn"},o(r.value?s(t)==="bn"?"তৈরি হচ্ছে...":"Creating...":s(t)==="bn"?"অ্যাকাউন্ট তৈরি করুন":"Create Account"),9,X),e("div",Y,[e("p",null,[p(o(s(t)==="bn"?"ইতিমধ্যে অ্যাকাউন্ট আছে?":"Already have an account?")+" ",1),i(N,{to:"/login"},{default:M(()=>[p(o(s(t)==="bn"?"লগইন করুন":"Login"),1)]),_:1})])])],32)])])]),i(T)])}}},re=I(Z,[["__scopeId","data-v-b151ffe2"]]);export{re as default};
