import { ElementType } from "react"; /** Size preset for UpgradeButton; "sm" is a dense variant of the same badge, not simply a smaller one. */ export type UpgradeButtonSize = "sm" | "md" | "lg"; /** * Theme-aware color variants. Each resolves to a gradient built from the * active theme's tokens, so the button blends with whichever theme is active. */ export type UpgradeButtonVariant = "brand" | "primary" | "secondary" | "success" | "warning" | "danger" | "info"; /** Prominent animated shimmer CTA button for "upgrade now" actions — not the compact plan-state pill; see PlanPill/PlanBadge for that. Reused as LimitReachedModal's own CTA. */ export interface UpgradeButtonProps { /** Primary label (shown on md+ screens). */ label: string; /** Compact label for small screens. Defaults to `label`. */ mobileLabel?: string; /** Optional small second line, e.g. a plan-expiry message. */ subtitle?: string; /** Leading icon. Defaults to lucide `Sparkles`. Pass null to hide. */ icon?: ElementType | null; /** Defaults to gold only when gold clears 3:1 (non-text) against the painted gradient stops; otherwise silently falls back to the label's ink color. */ iconColor?: string; /** * Theme-aware color variant. Defaults to `brand` (the active theme's * gradient). Ignored when an explicit `gradient` is provided. */ variant?: UpgradeButtonVariant; /** * Explicit gradient stops. Overrides `variant` and the theme gradient when * provided. */ gradient?: { /** Start color of the 135deg gradient; reversed on hover. */ from: string; /** End color of the gradient; label ink is chosen to clear contrast on both stops. */ to: string; }; /** Default "md". */ size?: UpgradeButtonSize; /** Animated light sweep on hover. Default true. */ shimmer?: boolean; /** Blocks onClick and shows a spinner, but does NOT set the native disabled attribute or dim opacity — pair with isDisabled for that. */ isLoading?: boolean; /** Unlike isLoading, this also dims opacity and sets the native disabled attribute. */ isDisabled?: boolean; /** Truncate the label beyond this width. */ maxLabelWidth?: string; /** Replaces the name read from the visible text; it must contain that text, or voice control cannot match it. */ ariaLabel?: string; /** Click handler; not called while `isLoading` or `isDisabled`. */ onClick?: React.MouseEventHandler; }