import{o as e}from"./chunk-CFjPhJqf.js";import{i as t,r as n}from"./bundle-mjs-DuVun8J2.js";import"./react-dom-CyRBZdbZ.js";import{c as r,t as i}from"./chunk-LFPYN7LY-Dq4q0Zxd.js";import{n as a,t as o}from"./use-reduced-motion-CXc1Gmc_.js";import{t as s}from"./button-DbPycOZU.js";import{t as c}from"./arrow-left-0rV8y4vB.js";import"./client-CfJnSvcd.js";import{t as l}from"./label-ctPQ70ek.js";import{Rt as u,Xt as d,at as f,gt as p,it as m}from"./index-BZmR4FtW.js";var h=e(t(),1),g=n();function _(){let e=r(),t=u(),n=o(),[_,v]=(0,h.useState)(``),[y,b]=(0,h.useState)(``),[x,S]=(0,h.useState)(``),[C,w]=(0,h.useState)(``),[T,E]=(0,h.useState)(!1),[D,O]=(0,h.useState)(``);async function k(n){if(n.preventDefault(),O(``),x!==C){O(`Passwords do not match`);return}if(x.length<6){O(`Password must be at least 6 characters`);return}E(!0),await new Promise(e=>setTimeout(e,1e3)),E(!1),t.capture(`user_signed_up`,{source:`signup_page`,has_name:!!_.trim()}),e(`/`,{replace:!0})}return(0,g.jsx)(`div`,{className:`flex min-h-dvh items-center justify-center bg-background px-4`,children:(0,g.jsx)(a.div,{initial:{opacity:0,y:n?0:12},animate:{opacity:1,y:0},transition:n?m.instant:m.default,className:`surface-raised-card w-full max-w-100 border border-border-subtle p-8`,children:(0,g.jsxs)(`form`,{onSubmit:k,className:`flex flex-col gap-5`,children:[(0,g.jsxs)(`div`,{className:`flex flex-col items-center gap-3 pb-2`,children:[(0,g.jsx)(f,{className:`w-8 h-3.75 text-foreground`}),(0,g.jsxs)(`div`,{className:`text-center`,children:[(0,g.jsx)(`h1`,{className:`text-foreground typo-h3`,children:`Create your account`}),(0,g.jsx)(`p`,{className:`text-muted-foreground mt-1 typo-caption`,children:`Get started with Skill Fleet`})]})]}),(0,g.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,g.jsx)(l,{htmlFor:`signup-name`,className:`typo-label`,children:`Full name`}),(0,g.jsx)(p,{id:`signup-name`,type:`text`,value:_,onChange:e=>v(e.target.value),placeholder:`Alex Chen`,required:!0,autoComplete:`name`})]}),(0,g.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,g.jsx)(l,{htmlFor:`signup-email`,className:`typo-label`,children:`Email`}),(0,g.jsx)(p,{id:`signup-email`,type:`email`,value:y,onChange:e=>b(e.target.value),placeholder:`you@company.com`,required:!0,autoComplete:`email`})]}),(0,g.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,g.jsx)(l,{htmlFor:`signup-password`,className:`typo-label`,children:`Password`}),(0,g.jsx)(p,{id:`signup-password`,type:`password`,value:x,onChange:e=>S(e.target.value),placeholder:`At least 6 characters`,required:!0,autoComplete:`new-password`})]}),(0,g.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,g.jsx)(l,{htmlFor:`signup-confirm`,className:`typo-label`,children:`Confirm password`}),(0,g.jsx)(p,{id:`signup-confirm`,type:`password`,value:C,onChange:e=>w(e.target.value),placeholder:`Repeat your password`,required:!0,autoComplete:`new-password`})]}),D&&(0,g.jsx)(a.p,{initial:{opacity:0,y:n?0:-4},animate:{opacity:1,y:0},transition:n?m.instant:m.snappy,className:`text-destructive text-center typo-caption`,role:`alert`,children:D}),(0,g.jsx)(s,{type:`submit`,className:`w-full`,disabled:T||!y||!_||!x||!C,children:T?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(d,{className:`size-4 animate-spin motion-reduce:animate-none`}),(0,g.jsx)(`span`,{className:`typo-label`,children:`Creating account...`})]}):(0,g.jsx)(`span`,{className:`typo-label`,children:`Create Account`})}),(0,g.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,g.jsx)(`div`,{className:`flex-1 h-px bg-border-subtle`}),(0,g.jsx)(`span`,{className:`text-muted-foreground typo-helper`,children:`or`}),(0,g.jsx)(`div`,{className:`flex-1 h-px bg-border-subtle`})]}),(0,g.jsx)(`div`,{className:`text-center`,children:(0,g.jsxs)(i,{to:`/login`,className:`inline-flex items-center gap-1.5 text-muted-foreground transition-colors hover:text-foreground typo-caption`,children:[(0,g.jsx)(c,{className:`size-3.5`}),`Already have an account? Sign in`]})}),(0,g.jsx)(`p`,{className:`text-center text-muted-foreground typo-helper`,children:`Demo mode — any details will work`})]})})})}export{_ as SignupPage};