import{q as c,c as b,b as u,d as p,u as s,h as g,e as t,s as w,f as a,v as l,o as i,i as d,t as n,k as m,m as f,l as _}from"./app-Dtb5XozN.js";import{_ as v}from"./PublicLayout-b9Cnw3ho.js";const k={class:"min-h-[60vh] flex items-center justify-center py-12 px-4"},V={class:"w-full max-w-md"},h={class:"bg-white rounded-xl shadow-sm border border-gray-200 p-8"},C={class:"grid grid-cols-2 gap-4"},N={key:0,class:"text-red-500 text-xs mt-1"},U={key:0,class:"text-red-500 text-xs mt-1"},B={key:0,class:"text-red-500 text-xs mt-1"},S={key:0,class:"text-red-500 text-xs mt-1"},F=["disabled"],M={class:"text-center text-sm text-gray-500 mt-6"},P={__name:"Register",setup(A){const r=c({first_name:"",last_name:"",email:"",password:"",password_confirmation:""}),x=()=>{r.post("/storesight/register",{onFinish:()=>r.reset("password","password_confirmation")})};return(y,e)=>(i(),b(v,null,{default:u(()=>[p(s(g),{title:"Register"}),t("div",k,[t("div",V,[e[12]||(e[12]=t("div",{class:"text-center mb-8"},[t("h1",{class:"text-3xl font-bold text-gray-900"},"Create your account"),t("p",{class:"text-gray-500 mt-2"},"Start your 14-day free trial")],-1)),t("div",h,[t("form",{onSubmit:w(x,["prevent"]),class:"space-y-5"},[t("div",C,[t("div",null,[e[5]||(e[5]=t("label",{class:"block text-sm font-medium text-gray-700 mb-1"},"First Name",-1)),a(t("input",{"onUpdate:modelValue":e[0]||(e[0]=o=>s(r).first_name=o),type:"text",class:"w-full px-4 py-3 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-primary focus:border-primary outline-none"},null,512),[[l,s(r).first_name]]),s(r).errors.first_name?(i(),d("p",N,n(s(r).errors.first_name),1)):m("",!0)]),t("div",null,[e[6]||(e[6]=t("label",{class:"block text-sm font-medium text-gray-700 mb-1"},"Last Name",-1)),a(t("input",{"onUpdate:modelValue":e[1]||(e[1]=o=>s(r).last_name=o),type:"text",class:"w-full px-4 py-3 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-primary focus:border-primary outline-none"},null,512),[[l,s(r).last_name]]),s(r).errors.last_name?(i(),d("p",U,n(s(r).errors.last_name),1)):m("",!0)])]),t("div",null,[e[7]||(e[7]=t("label",{class:"block text-sm font-medium text-gray-700 mb-1"},"Email",-1)),a(t("input",{"onUpdate:modelValue":e[2]||(e[2]=o=>s(r).email=o),type:"email",class:"w-full px-4 py-3 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-primary focus:border-primary outline-none",placeholder:"you@example.com"},null,512),[[l,s(r).email]]),s(r).errors.email?(i(),d("p",B,n(s(r).errors.email),1)):m("",!0)]),t("div",null,[e[8]||(e[8]=t("label",{class:"block text-sm font-medium text-gray-700 mb-1"},"Password",-1)),a(t("input",{"onUpdate:modelValue":e[3]||(e[3]=o=>s(r).password=o),type:"password",class:"w-full px-4 py-3 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-primary focus:border-primary outline-none",placeholder:"Minimum 8 characters"},null,512),[[l,s(r).password]]),s(r).errors.password?(i(),d("p",S,n(s(r).errors.password),1)):m("",!0)]),t("div",null,[e[9]||(e[9]=t("label",{class:"block text-sm font-medium text-gray-700 mb-1"},"Confirm Password",-1)),a(t("input",{"onUpdate:modelValue":e[4]||(e[4]=o=>s(r).password_confirmation=o),type:"password",class:"w-full px-4 py-3 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-primary focus:border-primary outline-none"},null,512),[[l,s(r).password_confirmation]])]),t("button",{type:"submit",disabled:s(r).processing,class:"w-full bg-primary text-white font-semibold py-3 rounded-lg hover:bg-primary-dark transition disabled:opacity-50"},n(s(r).processing?"Creating account...":"Create Account"),9,F)],32),t("p",M,[e[11]||(e[11]=f(" Already have an account? ",-1)),p(s(_),{href:y.$url("/login"),class:"text-primary font-medium hover:underline"},{default:u(()=>[...e[10]||(e[10]=[f("Sign in",-1)])]),_:1},8,["href"])])])])])]),_:1}))}};export{P as default};
