import type { UsageAllowancePeriod, WorkspaceUsageResponse } from "@opengeni/sdk/usage-allowances"; import { type ReactNode } from "react"; import { type UsageClientLike } from "../hooks/use-usage.js"; import { type AllowanceLabels } from "../usage/allowance-copy.js"; import { type UsageSummary } from "../usage/summary.js"; import { type OpenGeniText } from "../messages/runtime.js"; export type UsageLimitNoticeLabels = AllowanceLabels & { /** "You've used 85% of your usage limit." */ memberWarning: (percent: string) => string; /** "This workspace has used 85% of its usage budget." */ workspaceWarning: (percent: string) => string; memberExhausted: string; workspaceExhausted: string; dismiss: string; }; export declare const DEFAULT_USAGE_LIMIT_NOTICE_LABELS: (t: OpenGeniText) => UsageLimitNoticeLabels; type NoticeBaseProps = { labels?: Partial | undefined; /** * Your own next step beside the message, for example an "Upgrade" or * "Request more" button. Receives the summary so it can differ by scope. */ action?: ((summary: UsageSummary) => ReactNode) | undefined; /** * Remember a dismissed warning for this browser tab. The key should name the * workspace; the period and scope are added for you, so a new warning (or a * new period) shows again. Reaching the limit is never dismissible. */ dismissStorageKey?: string | undefined; className?: string | undefined; }; export type UsageLimitNoticeProps = NoticeBaseProps & { /** A usage response you already loaded; omit it to read `/usage/me`. */ usage?: WorkspaceUsageResponse | null | undefined; client?: UsageClientLike | undefined; workspaceId?: string | undefined; period?: UsageAllowancePeriod | undefined; refreshKey?: unknown; }; /** * A calm line for the composer when a member is close to, or at, a usage * limit: what happened, who can raise it, and when it resets. Renders nothing * while usage is comfortable, unlimited, loading, or unreadable. */ export declare function UsageLimitNotice({ usage, client, workspaceId, period, refreshKey, ...view }: UsageLimitNoticeProps): import("react").JSX.Element; /** Presentational notice for a summary you computed (`summarizeUsage`). */ export declare function UsageLimitNoticeView({ summary, labels: overrides, action, dismissStorageKey, className, }: NoticeBaseProps & { summary: UsageSummary | null; }): import("react").JSX.Element | null; export {};