import{C as n,l as i,n as t,p,q as a,v as d,u as s,t as l,x as m,A as f,B as x,D as c,_ as b}from"./Button-DnvJ7MH3.js";import{u as w}from"./app-DQqXS6xG.js";const z={class:"min-h-screen flex items-center justify-center bg-zinc-50 dark:bg-zinc-950 px-4"},k={class:"w-full max-w-sm space-y-6"},g={key:0,class:"mt-1 text-sm text-red-600"},y={key:0,class:"mt-1 text-sm text-red-600"},v={key:0,class:"mt-1 text-sm text-red-600"},q={__name:"Register",setup(h){const r=w({name:"",email:"",password:"",password_confirmation:""});function u(){r.post("/register",{onFinish:()=>r.reset("password","password_confirmation")})}return(V,e)=>(n(),i("div",z,[t("div",k,[e[9]||(e[9]=t("div",{class:"text-center"},[t("h1",{class:"text-2xl font-bold text-zinc-900 dark:text-white"},"Cadastrar"),t("p",{class:"mt-1 text-sm text-zinc-600 dark:text-zinc-400"},"Infoprodutor")],-1)),t("form",{class:"space-y-4",onSubmit:p(u,["prevent"])},[t("div",null,[e[4]||(e[4]=t("label",{for:"name",class:"block text-sm font-medium text-zinc-700 dark:text-zinc-300"},"Nome",-1)),a(t("input",{id:"name","onUpdate:modelValue":e[0]||(e[0]=o=>s(r).name=o),type:"text",autocomplete:"name",required:"",class:"mt-1 block w-full rounded-lg border border-zinc-300 dark:border-zinc-600 bg-white dark:bg-zinc-900 px-3 py-2 text-zinc-900 dark:text-white shadow-sm focus:border-zinc-500 focus:outline-none focus:ring-1 focus:ring-zinc-500"},null,512),[[d,s(r).name]]),s(r).errors.name?(n(),i("p",g,l(s(r).errors.name),1)):m("",!0)]),t("div",null,[e[5]||(e[5]=t("label",{for:"email",class:"block text-sm font-medium text-zinc-700 dark:text-zinc-300"},"E-mail",-1)),a(t("input",{id:"email","onUpdate:modelValue":e[1]||(e[1]=o=>s(r).email=o),type:"email",autocomplete:"email",required:"",class:"mt-1 block w-full rounded-lg border border-zinc-300 dark:border-zinc-600 bg-white dark:bg-zinc-900 px-3 py-2 text-zinc-900 dark:text-white shadow-sm focus:border-zinc-500 focus:outline-none focus:ring-1 focus:ring-zinc-500"},null,512),[[d,s(r).email]]),s(r).errors.email?(n(),i("p",y,l(s(r).errors.email),1)):m("",!0)]),t("div",null,[e[6]||(e[6]=t("label",{for:"password",class:"block text-sm font-medium text-zinc-700 dark:text-zinc-300"},"Senha",-1)),a(t("input",{id:"password","onUpdate:modelValue":e[2]||(e[2]=o=>s(r).password=o),type:"password",autocomplete:"new-password",required:"",class:"mt-1 block w-full rounded-lg border border-zinc-300 dark:border-zinc-600 bg-white dark:bg-zinc-900 px-3 py-2 text-zinc-900 dark:text-white shadow-sm focus:border-zinc-500 focus:outline-none focus:ring-1 focus:ring-zinc-500"},null,512),[[d,s(r).password]]),s(r).errors.password?(n(),i("p",v,l(s(r).errors.password),1)):m("",!0)]),t("div",null,[e[7]||(e[7]=t("label",{for:"password_confirmation",class:"block text-sm font-medium text-zinc-700 dark:text-zinc-300"},"Confirmar senha",-1)),a(t("input",{id:"password_confirmation","onUpdate:modelValue":e[3]||(e[3]=o=>s(r).password_confirmation=o),type:"password",autocomplete:"new-password",required:"",class:"mt-1 block w-full rounded-lg border border-zinc-300 dark:border-zinc-600 bg-white dark:bg-zinc-900 px-3 py-2 text-zinc-900 dark:text-white shadow-sm focus:border-zinc-500 focus:outline-none focus:ring-1 focus:ring-zinc-500"},null,512),[[d,s(r).password_confirmation]])]),f(b,{type:"submit",class:"w-full",disabled:s(r).processing},{default:x(()=>[...e[8]||(e[8]=[c(" Cadastrar ",-1)])]),_:1},8,["disabled"])],32),e[10]||(e[10]=t("p",{class:"text-center text-sm text-zinc-600 dark:text-zinc-400"},[c(" Já tem conta? "),t("a",{href:"/login",class:"font-medium text-zinc-900 dark:text-white hover:underline"},"Entrar")],-1))])]))}};export{q as default};
