import y from"./Icon.1464d3c9.js";import{_ as k}from"./nuxt-link.0e2876ca.js";import{_ as S}from"./Input.7105798b.js";import{_ as N}from"./Button.c35f3c05.js";import{N as U,u as R,bK as g,bL as z,aL as C,o as m,c as r,a as e,bz as v,ba as s,b as a,d as n,t as A,z as c,w as h,p as I,e as M,_ as B}from"./entry.816e6e91.js";import{_ as L}from"./small.04dfda7e.js";const q=d=>(I("data-v-5de3822d"),d=d(),M(),d),E={class:"col-lg-6 col-md-8 m-auto"},T={class:"content-container position-relative"},W=["onSubmit"],$=q(()=>e("h5",{class:"mb-4 fw-bold d-flex align-items-center"},[n("Welcome to "),e("img",{src:L,alt:"Logo"}),n(" dashboard")],-1)),D={key:0,class:"errors__container text-danger text-capitalize mb-2 fw-medium d-flex align-items-center"},F={key:1,class:"text-success text-capitalize mb-2 fw-medium d-flex align-items-center"},H={class:"row"},K={class:"col-lg-6"},P={class:"mb-4"},j={class:"col-lg-6"},G={class:"mb-4"},J={class:"col-lg-6"},O={class:"mb-4"},Q={class:"col-lg-6"},X={class:"mb-4"},Y={class:"col-lg-6"},Z={class:"mb-4"},ee={class:"mb-3"},se={key:0},oe=U({__name:"register",setup(d){R({title:"Register"});const{registerUser:x}=g(),{registered:_,pending:u,msg:p}=z(g()),o=C({fullname:"",username:"",mobile_number:"",email:"",password:""}),b=async()=>{await x(o.value),_.value&&(o.value={fullname:"",username:"",mobile_number:"",email:"",password:""})};return(te,t)=>{const f=y,V=k,i=S,w=N;return m(),r("div",E,[e("div",T,[e("form",{class:"form-container bg-white pt-5 pb-3 px-5 my-4",onSubmit:v(b,["prevent"])},[$,s(p)?(m(),r("div",D,[a(f,{name:"material-symbols:info-outline",class:"me-1"}),n(" "+A(s(p)),1)])):c("",!0),s(_)?(m(),r("div",F,[a(f,{name:"clarity:success-standard-line",class:"me-1"}),n(" Registered successfully, you can "),a(V,{to:"/admin/login",class:"mx-2 fw-bold"},{default:h(()=>[n("Sign in")]),_:1}),n(" now ")])):c("",!0),e("div",H,[e("div",K,[e("div",P,[a(i,{label:"Full Name",type:"text",placeholder:"Ali Mohamed",modelValue:s(o).fullname,"onUpdate:modelValue":t[0]||(t[0]=l=>s(o).fullname=l),isRequired:!0},null,8,["modelValue"])])]),e("div",j,[e("div",G,[a(i,{label:"Mobile Number",type:"number",placeholder:"35412321",modelValue:s(o).mobile_number,"onUpdate:modelValue":t[1]||(t[1]=l=>s(o).mobile_number=l),modelModifiers:{number:!0},isRequired:!0},null,8,["modelValue"])])]),e("div",J,[e("div",O,[a(i,{label:"Username",type:"text",placeholder:"Ali44",modelValue:s(o).username,"onUpdate:modelValue":t[2]||(t[2]=l=>s(o).username=l)},null,8,["modelValue"])])]),e("div",Q,[e("div",X,[a(i,{label:"Email Address",type:"text",placeholder:"admin@socialmart.com",modelValue:s(o).email,"onUpdate:modelValue":t[3]||(t[3]=l=>s(o).email=l)},null,8,["modelValue"])])]),e("div",Y,[e("div",Z,[a(i,{label:"Password",type:"password",placeholder:"***********",modelValue:s(o).password,"onUpdate:modelValue":t[4]||(t[4]=l=>s(o).password=l)},null,8,["modelValue"])])])]),e("div",ee,[a(w,{type:"submit",color:"main",class:"text-uppercase",fullWidth:"",size:"lg",disabled:s(u),onClick:v(b,["prevent"])},{default:h(()=>[n("Register "),s(u)?(m(),r("span",se,"...")):c("",!0)]),_:1},8,["disabled","onClick"])])],40,W)])])}}});const re=B(oe,[["__scopeId","data-v-5de3822d"]]);export{re as default};
