1import{k as N,r as x,j as e,L as l}from"./vendor-react-D4NFYCVY.js";import{u as b,S as v,L as S,B as o,R as i,a as w,b as A,c as L,d as k,e as O,A as P,t as p}from"./index-Bo7vBx4r.js";import{A as I,a as E,b as R}from"./alert-D76yy7Qz.js";import{S as C}from"./SchoolSelect-BMAkMHwi.js";import{m as t}from"./vendor-motion-LReuCgk7.js";import"./vendor-data-DiuZHwsT.js";import"./vendor-state-mPENyaSF.js";import"./vendor-firebase-BXtaSaVx.js";import"./vendor-ui-DW-ZtMoV.js";import"./vendor-utils-CBGDym6X.js";import"./vendor-tiptap-DOlczfgE.js";import"./input-D7jdUXkC.js";import"./label-B3SoQVvX.js";import"./select-tgHeBxeb.js";import"./useRegisteredSchools-C6GNEfSR.js";import"./search-BABb3Il5.js";function X(){const c=N(),{user:s,registerSchool:h,signOut:u,isLoading:m}=b(),[n,d]=x.useState(!1),[a,j]=x.useState(null),f=async()=>{if(a){d(!0);try{await h(a.id),p.success("íêµ ì°ê²°ì´ ìë£ëìì´ì."),c(i.APP.DASHBOARD)}catch(r){p.error(r instanceof Error?r.message:"íêµ ì°ê²°ì ì¤í¨íìµëë¤.")}finally{d(!1)}}},g=async()=>{await u(),c(i.LOGIN)},y=r=>{switch(r){case"email":return"ì íë²í¸ / ë¹ë°ë²í¸";default:return"ì´ë©ì¼"}};return e.jsx("div",{className:"min-h-screen bg-gradient-to-br from-muted/50 via-background to-muted/30 flex items-center justify-center p-4",children:e.jsxs(t.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{type:"spring",stiffness:300,damping:25},className:"w-full max-w-md",children:[e.jsxs("div",{className:"text-center mb-10",children:[e.jsx(t.div,{initial:{scale:.8,opacity:0}
1,animate:{scale:1,opacity:1},transition:{type:"spring",stiffness:400,damping:20,delay:.1},className:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-primary shadow-lg mb-5",children:e.jsx(v,{className:"w-8 h-8 text-primary-foreground"})}),e.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"íêµ ì°ê²°"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"ì´ë¯¸ ë¡ê·¸ì¸í ê³ì ì ìì íêµë¥¼ ì°ê²°í ëë§ ì¬ì©íë ë¨ê³ì
ëë¤."})]}),!s&&e.jsx(t.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.15},className:"mb-6",children:e.jsxs(I,{className:"border-primary/20 bg-primary/5",children:[e.jsx(S,{className:"h-4 w-4"}),e.jsx(E,{children:"íêµ ì°ê²°ì ë¡ê·¸ì¸ í ì§íí©ëë¤"}),e.jsxs(R,{className:"space-y-3",children:[e.jsx("p",{children:"ì´ë¯¸ ê³ì ì´ ìê³ ìì íêµë§ ì°ê²°íë ¤ë ê²½ì°ì ì¬ì©í©ëë¤."}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row",children:[e.jsx(o,{asChild:!0,className:"h-11 rounded-xl",children:e.jsxs(l,{to:i.SIGNUP_PHONE,children:[e.jsx(w,{className:"w-4 h-4"}),"ì íë²í¸ë¡ ì ê°ì
ìì"]})}),e.jsx(o,{asChild:!0,variant:"outline",className:"h-11 rounded-xl",children:e.jsx(l,{to:i.LOGIN,children:"ë¡ê·¸ì¸ì¼ë¡ ëìê°ê¸°"})})]})]})]})}),s&&e.jsxs(t.div,{initial:{opacity:0}
1,animate:{opacity:1},transition:{delay:.2},className:"flex items-center gap-3 p-4 bg-card rounded-2xl border mb-6",children:[e.jsxs(A,{className:"h-10 w-10",children:[e.jsx(L,{src:s.profileImage,alt:s.name}),e.jsx(k,{className:"bg-primary/10 text-primary font-bold",children:s.name.charAt(0)})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"font-medium truncate",children:s.name}),e.jsxs("p",{className:"text-sm text-muted-foreground truncate",children:["íì¬ ë¡ê·¸ì¸ ë°©ì: ",y(s.provider)]})]}),e.jsx("button",{type:"button",onClick:g,className:"text-sm text-muted-foreground hover:text-foreground transition-colors shrink-0",children:e.jsx(O,{className:"h-4 w-4"})})]}),e.jsxs(t.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.25},className:"mb-5 rounded-2xl border border-border bg-card/70 p-4",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:"ì´ íë©´ì´ íìí ê²½ì°"}),e.jsxs("ul",{className:"mt-2 space-y-1 text-sm text-muted-foreground",children:[e.jsx("li",{children:"ì´ë¯¸ ë§ë ê³ì ì ìì íêµë¥¼ ì°ê²°í´ì¼ í ë"}),e.jsx("li",{children:"ì´ë ë§í¬ ëì ì§ì íêµë¥¼ ê³¨ë¼ í©ë¥í´ì¼ í ë"})]})]}),e.jsxs(t.div,{initial:{opacity:0}
1,animate:{opacity:1},transition:{delay:.3},className:"space-y-4",children:[e.jsx(C,{value:a==null?void 0:a.id,onChange:j,disabled:m||n}),e.jsx(o,{type:"button",onClick:f,className:"w-full h-14 text-lg rounded-2xl",disabled:m||n||!a,children:n?"ì°ê²° ì¤...":e.jsxs(e.Fragment,{children:["íêµ ì°ê²°í기",e.jsx(P,{className:"ml-2 h-5 w-5"})]})})]}),e.jsx(t.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.4},className:"text-center mt-8 space-y-2",children:e.jsxs("p",{className:"text-sm text-muted-foreground",children:["ì ê· êµì¬ ê°ì
ì´ íìíë¤ë©´"," ",e.jsx(l,{to:i.SIGNUP_PHONE,className:"font-semibold text-primary hover:underline",children:"ì íë²í¸ ê°ì
"}),"ì¼ë¡ ììí´ ì£¼ì¸ì."]})})]})})}export{X as SchoolRegistrationPage,X 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.