import { UpgradeErrorExtensions } from '../utils/quotaErrors'; /** * Global window event the shell listens for to open the upgrade modal. * Dispatched by the Apollo error link (and any imperative caller) when * a STORAGE_QUOTA_EXCEEDED / RESOURCE_CAP_EXCEEDED / QUOTA_EXHAUSTED * GraphQL error is observed. */ export declare const UPGRADE_PROMPT_EVENT = "burdenoff:upgrade-prompt"; export interface UpgradePromptDetail { extensions: UpgradeErrorExtensions; /** Optional human-friendly title override (e.g. "Storage full"). */ title?: string; /** Optional override for the description body. */ description?: string; } /** * Imperative dispatcher. Apollo onError, mutation catch blocks, or proactive * UI may call this to open the global upgrade modal. Safe no-op on SSR. */ export declare function dispatchUpgradePrompt(detail: UpgradePromptDetail): void; /** * Translation strings consumed by {@link UpgradePromptModal}. All entries are * optional and fall back to bundled English. Hosts may wire these to their * i18n layer (e.g. `react-i18next`) via the `t` helper: * * ```ts * translations={{ * storageTitle: t('upgradeCTA.modal.storageTitle', 'Storage limit reached'), * ... * }} * ``` */ export interface UpgradePromptModalTranslations { storageTitle?: string; resourceTitleTemplate?: (resource: string) => string; defaultTitle?: string; descriptionTemplate?: (planName: string, resource: string) => string; usageBytes?: (currentLabel: string, limitLabel: string) => string; usageCount?: (currentLabel: string, limitLabel: string) => string; closeAriaLabel?: string; notNow?: string; upgrade?: string; } export interface UpgradePromptModalProps { /** Where to send the user — defaults to `/billing/plans`. */ upgradePath?: string; /** Optional renderer override for the upgrade CTA (e.g. Link from router). */ renderCta?: (props: { href: string; onClick: () => void; }) => React.ReactNode; /** Optional i18n strings; falls back to English defaults. */ translations?: UpgradePromptModalTranslations; className?: string; } /** * `UpgradePromptModal` — globally-mounted modal that listens for * `UPGRADE_PROMPT_EVENT` and surfaces an upgrade prompt when a plan limit * is hit. Mount once near the root of the host shell. * * All colours come from semantic tokens — no raw hex/rgb. */ export declare function UpgradePromptModal({ upgradePath, renderCta, translations, className, }: UpgradePromptModalProps): import("react/jsx-runtime").JSX.Element | null; //# sourceMappingURL=UpgradePromptModal.d.ts.map