import{C as s,l as n,n as e,q as a,v as d,u as r,t as l,x as m,A as p,B as u,D as x,_ as c,p as b}from"./Button-C4ZsXdIM.js";import{u as f,l as k}from"./app-CP_uAe3y.js";import{_ as z}from"./LayoutInfoprodutor-CMp0A9-q.js";import"./usePwaInstall-CXPwd-uF.js";import"./smartphone-CkwbKqQl.js";import"./x-OwDgJ5ec.js";import"./circle-dollar-sign-BLTAhpdp.js";import"./users-D-QUk3Rv.js";import"./mail-BGVgiAL0.js";import"./file-code-DCIaia7A.js";import"./ThemeToggler-BZKtVSiL.js";import"./external-link-BPoRZnUn.js";import"./check-ggb25uSC.js";import"./circle-check-XBfCkMMl.js";const w={class:"space-y-6"},g={key:0,class:"mt-1 text-sm text-red-600 dark:text-red-400"},y={key:0,class:"mt-1 text-sm text-red-600 dark:text-red-400"},v={key:0,class:"mt-1 text-sm text-red-600 dark:text-red-400"},C={class:"flex gap-2"},G=Object.assign({layout:z},{__name:"Create",setup(V){const o=f({name:"",email:"",password:"",password_confirmation:""});return(_,t)=>(s(),n("div",w,[t[11]||(t[11]=e("div",null,[e("h1",{class:"text-2xl font-bold tracking-tight text-zinc-900 dark:text-white"}," Novo infoprodutor "),e("p",{class:"mt-1 text-sm text-zinc-500 dark:text-zinc-400"}," Cadastre um novo usuário com acesso ao painel como infoprodutor. ")],-1)),e("form",{class:"max-w-xl space-y-4",onSubmit:t[4]||(t[4]=b(i=>r(o).post("/usuarios"),["prevent"]))},[e("div",null,[t[5]||(t[5]=e("label",{for:"name",class:"block text-sm font-medium text-zinc-700 dark:text-zinc-300"},"Nome",-1)),a(e("input",{id:"name","onUpdate:modelValue":t[0]||(t[0]=i=>r(o).name=i),type:"text",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-zinc-100"},null,512),[[d,r(o).name]]),r(o).errors.name?(s(),n("p",g,l(r(o).errors.name),1)):m("",!0)]),e("div",null,[t[6]||(t[6]=e("label",{for:"email",class:"block text-sm font-medium text-zinc-700 dark:text-zinc-300"},"E-mail",-1)),a(e("input",{id:"email","onUpdate:modelValue":t[1]||(t[1]=i=>r(o).email=i),type:"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-zinc-100"},null,512),[[d,r(o).email]]),r(o).errors.email?(s(),n("p",y,l(r(o).errors.email),1)):m("",!0)]),e("div",null,[t[7]||(t[7]=e("label",{for:"password",class:"block text-sm font-medium text-zinc-700 dark:text-zinc-300"},"Senha",-1)),a(e("input",{id:"password","onUpdate:modelValue":t[2]||(t[2]=i=>r(o).password=i),type:"password",required:"",minlength:"8",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-zinc-100"},null,512),[[d,r(o).password]]),r(o).errors.password?(s(),n("p",v,l(r(o).errors.password),1)):m("",!0)]),e("div",null,[t[8]||(t[8]=e("label",{for:"password_confirmation",class:"block text-sm font-medium text-zinc-700 dark:text-zinc-300"},"Confirmar senha",-1)),a(e("input",{id:"password_confirmation","onUpdate:modelValue":t[3]||(t[3]=i=>r(o).password_confirmation=i),type:"password",required:"",minlength:"8",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-zinc-100"},null,512),[[d,r(o).password_confirmation]])]),e("div",C,[p(c,{type:"submit",disabled:r(o).processing},{default:u(()=>[...t[9]||(t[9]=[x(" Cadastrar ",-1)])]),_:1},8,["disabled"]),p(r(k),{href:"/usuarios",class:"inline-flex items-center rounded-lg border border-zinc-300 dark:border-zinc-600 px-4 py-2 text-sm font-medium text-zinc-700 dark:text-zinc-300 hover:bg-zinc-50 dark:hover:bg-zinc-800"},{default:u(()=>[...t[10]||(t[10]=[x(" Cancelar ",-1)])]),_:1})])],32)]))}});export{G as default};
