1import{r as a,u as x,j as e}from"./index-If4P5t44.js";import{s as d}from"./client-BN_N-ZTx.js";import{B as j}from"./button-CO1UM39t.js";import{I as p}from"./input-CHQSMs9m.js";import{C as w,a as k,b,c as v}from"./card-BXtirX8f.js";import{u as n}from"./index-fwc8i9GA.js";import{N}from"./Navigation-DrdeEEuz.js";import"./tslib.es6-Ds0fHAFP.js";import"./utils-ClF6eiV5.js";import"./index-BHk7Wn1T.js";import"./index-IwD7A4tH.js";import"./index-BpFHpKBX.js";import"./index-CkcNIVng.js";import"./index-CIYSN-nV.js";import"./index-CpNrbBok.js";import"./Combination-DxhRFPMF.js";import"./layers-BEKutUkP.js";import"./wrench-D-C_bRoU.js";import"./shield-CuJiiC8S.js";import"./zap-CWk6dntQ.js";import"./circle-check-big-DuQQ51dT.js";import"./moon-mHDNWg3G.js";import"./sun-FUqrLHpd.js";import"./x-NPwXuPdH.js";const Q=()=>{const[r,c]=a.useState(!0),[o,u]=a.useState(""),[i,g]=a.useState(""),[m,l]=a.useState(!1),f=x(),h=async s=>{s.preventDefault(),l(!0);try{if(r){const{error:t}=await d.auth.signInWithPassword({email:o,password:i});if(t)throw t;n.success("Logget ind!"),f("/website-roadmap-admin")}else{const{error:t}=await d.auth.signUp({email:o,password:i});if(t)throw t;n.success("Tjek din email for at bekræfte din konto.")}}catch(t){n.error(t.message)}finally{l(!1)}};return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(N,{}),e.jsx("div",{className:"flex items-center justify-center px-4 py-16",children:e.jsxs(w,{className:"w-full max-w-md",children:[e.jsx(k,{children:e.jsx(b,{className:"text-center",children:r?"Log ind":"Opret konto"})}),e.jsxs(v,{children:[e.jsxs("form",{onSubmit:h,className:"space-y-4",children:[e.jsx(p,{type:"email",placeholder:"Email",value:o,onChange:s=>u(s.target.value),required:!0}),e.jsx(p,{type:"password",placeholder:"Adgangskode",value:i,onChange:s=>g(s.target.value),required:!0,minLength:6}),e.jsx(j,{type:"submit",className:"w-full",disabled:m,children:m?"Vent...":r?"Log ind":"Opret konto"})]}),e.jsx("button",{onClick:()=>c(!r),className:"mt-4 text-sm text-muted-foreground hover:text-foreground w-full text-center",children:r?"Har du ikke en konto? Opret en":"Har du allerede en konto? Log ind"})]})]})})]})};export{Q as default};
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.