import { Shield, ExternalLink, Loader2, AlertCircle } from "lucide-react"; import { useTranslation } from "@termix/plugin-sdk/frontend"; import { Button } from "@termix/plugin-sdk/ui"; export type SignInStage = "chooser" | "waiting" | "authenticating" | "error"; interface StepCaDialogProps { stage: SignInStage; error?: string; onCancel: () => void; onOpenUrl: () => void; backgroundColor?: string; } const actionButton = "border-accent-brand/40 text-accent-brand hover:bg-accent-brand/10 rounded-none text-[10px] font-bold uppercase tracking-widest w-full flex items-center gap-2"; const footerButton = "rounded-none text-[10px] font-bold uppercase tracking-widest"; /** The browser sign-in the terminal shows while Step CA waits. */ export function StepCaDialog({ stage, error, onCancel, onOpenUrl, backgroundColor, }: StepCaDialogProps) { const { t } = useTranslation(); return (
{t("dialog.description")}
)}{stage === "waiting" ? t("dialog.waiting") : t("dialog.authenticating")}
{t("common.error")}
{error}