import type { ReactNode } from "react"; /** * Empty/error/loading notice states for operations surfaces. * `error` renders with role="alert" (assertive); empty/loading render with * role="status" (polite). Text is the message; optional action passes through. */ export function NoticeState({ variant, message, hint, action, }: { variant: "empty" | "error" | "loading"; message: string; hint?: string; action?: ReactNode; }) { const role = variant === "error" ? "alert" : "status"; const tone = variant === "error" ? "border-rose-500/30 bg-rose-500/5 text-rose-300" : "border-border/60 bg-card/50 text-muted-foreground"; return (
{message}
{hint ?{hint}
: null} {action ?