"use client"; import { Label, Radio, RadioGroup } from "@headlessui/react"; import { Translated } from "./translated"; export enum AuthenticationMethod { Passkey = "passkey", Password = "password", } export const methods = [AuthenticationMethod.Passkey, AuthenticationMethod.Password]; export function AuthenticationMethodRadio({ selected, selectionChanged, }: { selected: any; selectionChanged: (value: any) => void; }) { return (
{methods.map((method) => ( `${focus ? "ring-2 ring-primary-light-500 ring-opacity-60 dark:ring-white/20" : ""} ${ checked ? "bg-background-light-400 ring-2 ring-primary-light-500 dark:bg-background-dark-400 dark:ring-primary-dark-500" : "bg-background-light-400 dark:bg-background-dark-400" } boder-divider-light relative flex h-full flex-1 cursor-pointer rounded-lg border px-5 py-4 hover:shadow-lg focus:outline-none dark:border-divider-dark dark:hover:bg-white/10` } >
{method === "passkey" && ( )} {method === "password" && ( form-textbox-password )}
))}
); }