import{a as e,i as t,n,o as r,r as i}from"./createLucideIcon-XxmMb-o2.js";import{t as a}from"./donor-page-header-Wb83AVtI.js";import{n as o}from"./wayfinder-Dp7PqxvV.js";import{D as s,p as c}from"./app-BvqieymH.js";import{t as l}from"./input-error-oHEIsY1C.js";import{n as u,r as d,t as f}from"./form-styles-CSOZH2T9.js";var p=i(),m=e=>({url:m.url(e),method:`post`});m.definition={methods:[`post`],url:`/login`},m.url=e=>m.definition.url+o(e),m.post=e=>({url:m.url(e),method:`post`});var h=e=>({action:m.url(e),method:`post`});h.post=e=>({action:m.url(e),method:`post`}),m.form=h,Object.assign(m,m);var g=n();function _(){let n=(0,p.c)(5),i;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,g.jsx)(e,{title:`Login`}),n[0]=i):i=n[0];let o;n[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,g.jsx)(a,{title:`Login`,backHref:`/`}),n[1]=o):o=n[1];let l;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,g.jsxs)(`div`,{className:`mb-6 text-center`,children:[(0,g.jsx)(`div`,{className:`mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-full bg-blood-tint`,children:(0,g.jsx)(s,{className:`h-8 w-8 fill-blood text-blood`,"aria-hidden":`true`})}),(0,g.jsx)(`h2`,{className:`text-[20px] font-bold tracking-tight`,children:`Welcome back`}),(0,g.jsx)(`p`,{className:`mt-1 text-[13px] text-ink-soft`,children:`Login to manage your donor profile`})]}),n[2]=l):l=n[2];let u;n[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,g.jsx)(t,{...m.form(),resetOnSuccess:[`password`],className:`space-y-3`,children:v}),n[3]=u):u=n[3];let d;return n[4]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,g.jsxs)(g.Fragment,{children:[i,(0,g.jsxs)(`div`,{className:`min-h-screen bg-page`,children:[o,(0,g.jsxs)(`div`,{className:`px-4 py-6`,children:[l,u,(0,g.jsx)(`div`,{className:`mt-4 flex items-center justify-between text-[12.5px]`,children:(0,g.jsx)(r,{href:c().url,className:`font-semibold text-blood hover:underline`,children:`Create New Profile`})})]})]})]}),n[4]=d):d=n[4],d}function v(e){let{processing:t,errors:n}=e;return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`div`,{children:[(0,g.jsx)(`label`,{htmlFor:`identifier`,className:u,children:`Phone Number / Username`}),(0,g.jsx)(`input`,{id:`identifier`,type:`text`,name:`identifier`,required:!0,autoFocus:!0,autoComplete:`username`,placeholder:`01XXXXXXXXX or username`,className:`${f} font-mono`}),(0,g.jsx)(l,{message:n.identifier})]}),(0,g.jsxs)(`div`,{children:[(0,g.jsx)(`label`,{htmlFor:`password`,className:u,children:`Password`}),(0,g.jsx)(`input`,{id:`password`,type:`password`,name:`password`,required:!0,autoComplete:`current-password`,placeholder:`Enter your password`,className:f}),(0,g.jsx)(l,{message:n.password})]}),(0,g.jsx)(`button`,{type:`submit`,disabled:t,className:d,children:`Login`})]})}export{_ as default};