import{j as e}from"./vendor-react-wBh_31cN.js";import{I as c}from"./input-H6_qmzms.js";import{L as l}from"./label-Dnebucx5.js";import{aq as o}from"./index-BKr2rJhV.js";const f=({isLoading:s,qrCode:t,otp:a,setOtp:n,mainText:i,secondaryText:r})=>s?e.jsx(o,{}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex items-center pb-[5px] font-sans text-xs font-medium",children:i}),e.jsxs("div",{className:"flex items-center border border-border p-2 font-sans text-xs font-medium",children:[e.jsx("div",{className:"flex w-1/3 overflow-hidden",children:e.jsx("img",{style:{width:"auto",height:"auto",minWidth:"100%",minHeight:"100%",objectFit:"none"},alt:"QR code",src:`data:image/png;base64,${t==null?void 0:t.img}`})}),e.jsxs("div",{className:"w-2/3",children:[e.jsx("p",{className:"text-center text-sm",children:"Scan this QR code using your Authenticator App"}),e.jsx("p",{className:"my-5 text-center text-sm",children:"or"}),e.jsxs("p",{className:"text-center text-sm",children:["type the following code"," ",e.jsx("span",{className:"font-bold",children:t==null?void 0:t.secret})]})]})]}),e.jsx("div",{className:"flex items-center pt-[5px] font-sans text-xs font-medium",children:r}),e.jsxs("div",{className:"pt-[15px]",children:[e.jsx(l,{htmlFor:"qr-otp",className:"mb-1 w-full",children:"Confirmation code"}),e.jsx(c,{id:"qr-otp",name:"code",placeholder:"123 456",required:!0,value:a,onChange:m=>n(m.target.value)})]})]});export{f as C};
