import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { cn } from "../../lib/utils";
import { Spinner } from "./Spinner";
const variantClassNames = {
    centered: "flex flex-col items-center justify-center gap-3 py-16 text-center",
    fill: "flex h-full flex-col items-center justify-center gap-3 p-6 text-center",
    inline: "flex items-center gap-2",
};
const defaultSpinnerSizes = {
    centered: "lg",
    fill: "2xl",
    inline: "sm",
};
const defaultSpinnerClassNames = {
    centered: "text-muted-foreground",
    fill: "text-muted-foreground",
    inline: "text-neutral-grey-50",
};
const defaultTextClassNames = {
    centered: "text-muted-foreground text-[12px]",
    fill: "text-muted-foreground text-[12px]",
    inline: "text-neutral-grey-50 text-[12px]",
};
export function LoadingState({ "aria-live": ariaLive = "polite", className, message = "Loading...", role = "status", spinnerClassName, spinnerSize, textClassName, variant = "centered", ...props }) {
    return (_jsxs("div", { role: role, "aria-live": ariaLive, ...props, className: cn(variantClassNames[variant], className), children: [_jsx(Spinner, { size: spinnerSize ?? defaultSpinnerSizes[variant], className: cn(defaultSpinnerClassNames[variant], spinnerClassName) }), message ? (_jsx("span", { className: cn(defaultTextClassNames[variant], textClassName), children: message })) : (_jsx("span", { className: "sr-only", children: "Loading" }))] }));
}
//# sourceMappingURL=LoadingState.js.map