import{r as e,t}from"./jsx-runtime-BbTa8W_M-1776590214964.js";import{a as n,n as r}from"./app-CXDQ5oEH-1776590214964.js";import{t as i}from"./useTranslation-D1etqd9u-1776590214964.js";import{t as a}from"./loader-circle-BF-wgoyu-1776590214964.js";import{t as o}from"./shield-check-BHIMgi8g-1776590214964.js";import{t as s}from"./button-WiAFyHfP-1776590214964.js";import{t as c}from"./label-DwYxovYB-1776590214964.js";import{t as l}from"./AuthLayout-BNB2211y-1776590214964.js";import{a as u,n as d,o as f,r as p,t as m}from"./card-Cby8flFO-1776590214964.js";import{t as h}from"./input-BlYvaS0F-1776590214964.js";e();var g=t();function _(){let{t:e}=i(),{data:t,setData:_,post:v,processing:y,errors:b}=n({code:``});return(0,g.jsxs)(l,{children:[(0,g.jsx)(r,{title:e(`Two-Factor Authentication`)}),(0,g.jsxs)(m,{className:`w-full border-border/50 shadow-lg bg-card`,children:[(0,g.jsxs)(u,{className:`space-y-1 text-center`,children:[(0,g.jsx)(`div`,{className:`mx-auto h-12 w-12 rounded-full bg-primary/10 flex items-center justify-center text-primary mb-2`,children:(0,g.jsx)(o,{className:`h-6 w-6`})}),(0,g.jsx)(f,{className:`text-2xl font-bold`,children:e(`Two-Factor Authentication`)}),(0,g.jsx)(p,{children:e(`Please confirm access to your account by entering the authentication code provided by your authenticator application.`)})]}),(0,g.jsx)(d,{children:(0,g.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),v(route(`two-factor.login`))},className:`space-y-4`,children:[(0,g.jsxs)(`div`,{className:`space-y-2 text-center`,children:[(0,g.jsx)(c,{htmlFor:`code`,className:`text-xs uppercase tracking-widest`,children:e(`Authentication Code`)}),(0,g.jsx)(h,{id:`code`,type:`text`,inputMode:`numeric`,placeholder:`123456`,value:t.code,onChange:e=>_(`code`,e.target.value.replace(/[^0-9]/g,``)),className:`text-center tracking-[0.5em] font-mono text-xl h-12 ${b.code?`border-destructive`:``}`,autoFocus:!0,required:!0}),b.code&&(0,g.jsx)(`p`,{className:`text-xs text-destructive font-bold`,children:b.code})]}),(0,g.jsxs)(s,{className:`w-full gap-2 text-base font-bold shadow-md mt-4`,type:`submit`,disabled:y||t.code.length!==6,children:[y?(0,g.jsx)(a,{className:`w-5 h-5 animate-spin`}):null,e(`Log in`)]})]})})]})]})}export{_ as default};