1import{u as k,r as u,j as e,H as v,L as N,b as L}from"./app-czhrZuOt.js";import{T as S}from"./ThemeToggle-BE__v9EI.js";import{G as _}from"./gallery-vertical-end-Bqx3QHSI.js";function O({status:w}){const l=k().props,d=l.available_locales||{},x=l.locales_meta||{};let n=l.app_locale||null;if(!n&&typeof window<"u")try{const s=new URLSearchParams(window.location.search).get("lang");s&&(n=s)}catch{}n=n||l.settings?.default_locale||(Object.keys(d)[0]??"en");const[r,g]=u.useState(n);u.useEffect(()=>{const t=l.app_locale;t&&t!==r&&g(t)},[l.app_locale]);const h=x[r]?.direction||x[r]?.dir,m=h==="rtl"||h!=="ltr"&&["ar","he","fa","ur","ps","sd","ug","dv"].includes(r)?"rtl":"ltr";u.useEffect(()=>{try{const t=document.documentElement;t&&(t.setAttribute("dir",m),m==="rtl"?t.classList.add("rtl"):t.classList.remove("rtl"))}catch{}},[r,m]);const c=l.settings||{},i=c.app_name||void 0||"Acme Inc.",o=t=>t?typeof t=="string"?t:t.url??t.path??t.full_url??t.src??null:null,p=o(c.logo_light)??o(c.dashboard_logo_light),f=o(c.logo_dark)??o(c.dashboard_logo_dark),j=l.errors?.error||w,a=(t,s)=>l.trans?.[t]??s;return e.jsxs(e.Fragment,{children:[e.jsx(v,{title:a("login_title","Sign in")}),e.jsxs("div",{className:"grid min-h-svh lg:grid-cols-2",children:[e.jsxs("div",{className:"flex flex-col gap-4 p-6 md:p-10",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2 w-full flex-nowrap",children:[e.jsx(N,{href:"/",className:"flex items-center gap-2 font-medium",children:p||f?e.jsxs(e.Fragment,{children:[e.jsx("img",{src:p??"",alt:i,className:"h-6 w-6 object-contain block dark:hidden"}),e.jsx("img",{src:f??"",alt:i,className:"h-6 w-6 object-contain hidden dark:block"}),e.jsx("span",{className:"ms-2",children:i})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex h-6 w-6 items-center justify-center rounded-md bg-primary text-primary-foreground",children:e.jsx(_,{className:"size-4"})}),e.jsx("span",{className:"ms-2",children:i})]})}),e.jsxs("div",{className:"ml-auto md:ml-4 flex items-center gap-2",children:[e.jsx(S,{}),Object.keys(d).length>1&&e.jsx("select",{className:"h-8 leading-8 align-middle py-0 rounded-md border border-input bg-transparent pl-2 pr-8 text-sm text-foreground appearance-none",value:r,onChange:t=>{const s=t.target.value;g(s);try{const y=document.querySelector('meta[name="csrf-token"]')?.content;fetch("/locale",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-TOKEN":y??""},body:JSON.stringify({locale:s})})}catch{}const b=new URL(window.location.href);b.searchParams.set("lang",s),window.location.href=b.toString()},children:Object.entries(d).map(([t,s])=>e.jsx("option",{value:t,children:s},t))})]})]}),e.jsx("div",{className:"flex flex-1 items-center justify-center",children:e.jsxs("div",{className:"w-full max-w-xs space-y-6",children:[e.jsxs("div",{className:"space-y-1 text-center",children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:a("login_title","Welcome back")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:a("login_subtitle","Sign in with your Kiges ID account")})]}),j&&e.jsx("div",{className:"rounded-md border border-destructive/30 bg-destructive/10 px-4 py-3 text-sm text-destructive",children:j}),e.jsx("a",{href:route("kiges.redirect"),className:"block",children:e.jsxs(L,{type:"button",className:"w-full gap-2",size:"lg",children:[e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",className:"h-5 w-5","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10",fill:"currentColor",opacity:"0.15"}),e.jsx("path",{d:"M8 12h8M12 8l4 4-4 4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),a("login_submit","Continue with Kiges ID")]})}),e.jsxs("p",{className:"text-center text-xs text-muted-foreground",children:[a("login_signup_prompt","Don't have a Kiges ID?")+" ",e.jsx(N,{href:route("kiges.redirect"),className:"underline underline-offset-4 hover:text-foreground",children:a("login_sign_up","Create one for free")})]})]})})]}),e.jsx("div",{className:"relative hidden bg-muted lg:block",children:e.jsx("div",{className:"absolute inset-0 flex items-center justify-center p-12",children:e.jsxs("div",{className:"max-w-md
1space-y-4 text-center",children:[e.jsx("div",{className:"mx-auto flex h-16 w-16 items-center justify-center rounded-full bg-primary/10",children:e.jsx(_,{className:"h-8 w-8 text-primary"})}),e.jsx("h2",{className:"text-2xl font-semibold tracking-tight",children:i}),e.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:a("login_profile_sync","One account. Full access. Sign in with Kiges ID and your profile stays in sync automatically.")})]})})})]})]})}export{O 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.