1import{j as e}from"./vendor-query-BVMb3S9f.js";import{r as t,L as m}from"./vendor-react-BmnyI7hj.js";import{u as g}from"./index-f89aq0IA.js";import"./vendor-ui-CGy3Dxhc.js";import"./vendor-supabase-cZ1AhKFM.js";import"./vendor-forms-DP4uz6ig.js";function S(){const[n,u]=t.useState(""),[s,x]=t.useState(""),[o,p]=t.useState(""),[i,a]=t.useState(null),[l,d]=t.useState(!1),[h,f]=t.useState(!1),{signUp:b}=g();async function y(r){if(r.preventDefault(),a(null),s!==o){a("Passwords do not match");return}if(s.length<6){a("Password must be at least 6 characters");return}d(!0);try{await b(n,s),f(!0)}catch(c){a(c instanceof Error?c.message:"Failed to sign up")}finally{d(!1)}}return h?e.jsx("div",{className:"min-h-screen bg-surface-secondary flex items-center justify-center p-4",children:e.jsx("div",{className:"w-full max-w-md",children:e.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-border p-8 text-center",children:[e.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:e.jsx("svg",{className:"w-8 h-8 text-green-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})})}),e.jsx("h1",{className:"text-2xl font-bold text-text-primary mb-2",children:"Check Your Email"}),e.jsxs("p",{className:"text-text-secondary mb-6",children:["We sent a confirmation link to ",e.jsx("span",{className:"font-medium text-text-primary",children:n})]}),e.jsx("p",{className:"text-sm text-text-secondary mb-6",children:"Click the link in the email to verify your account, then come back to sign in."}),e.jsx(m,{to:"/login",className:"inline-block bg-primary-600 hover:bg-primary-700 text-white font-medium py-2 px-6 rounded-md transition-colors",children:"Go to Sign In"})]})})}):e.jsx("div",{className:"min-h-screen bg-surface-secondary flex items-center justify-center p-4",children:e.jsx("div",{className:"w-full max-w-md",children:e.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-border p-8",children:[e.jsx("h1",{className:"text-2xl font-bold text-text-primary text-center mb-2",children:"Create Account"}),e.jsx("p",{className:"text-text-secondary text-center mb-8",children:"Get started with PLH Command Center"}),e.jsxs("form",{onSubmit:y,className:"space-y-4",children:[i&&e.jsx("div",{className:"bg-red-50 text-red-600 text-sm p-3 rounded-md",children:i}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"email",className:"block text-sm font-medium text-text-primary mb-1",children:"Email"}),e.jsx("input",{id:"email",type:"email",value:n,onChange:r=>u(r.target.value),required:!0,className:"w-full px-3 py-2 border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent",placeholder:"[email protected]"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-text-primary mb-1",children:"Password"}),e.jsx("input",{id:"password",type:"password",value:s,onChange:r=>x(r.target.value),required:!0,className:"w-full px-3 py-2 border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"confirmPassword",className:"block text-sm font-medium text-text-primary mb-1",children:"Confirm Password"}),e.jsx("input",{id:"confirmPassword",type:"password",value:o,onChange:r=>p(r.target.value),required:!0,className:"w-full px-3 py-2 border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢"})]}),e.jsx("button",{type:"submit",disabled:l,className:"w-full bg-primary-600 hover:bg-primary-700 text-white font-medium py-2 px-4 rounded-md transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:l?"Creating account...":"Create Account"})]}),e.jsxs("p",{className:"mt-6 text-center text-sm text-text-secondary",children:["Already have an account?"," ",e.jsx(m,{to:"/login",className:"text-primary-600 hover:text-primary-700 font-medium",children:"Sign In"})]})]})})})}export{S as SignUpPage};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.