import type { ReactElement } from 'react'; import type { CopilotUsageView } from './copilot-usage-types.ts'; import type { CopilotAccountsRemote } from './copilot-accounts-card.ts'; import type { SessionAccountView } from './session-accounts-remote.ts'; /** Client-only face: no credentials, provider transport or billing arithmetic. */ export interface CopilotUsageRemote { get(): Promise<{ ok: true; value: CopilotUsageView; } | { ok: false; error: unknown; }>; refresh(): Promise<{ ok: true; value: CopilotUsageView; } | { ok: false; error: unknown; }>; } export interface CopilotUsageCardProps { remote?: CopilotUsageRemote; accountsRemote?: Pick; /** Changes revoke every in-flight read, including switches between Copilot routes. */ contextKey: string; locale?: string; continuation?: ReactElement; onManage?: () => void; /** Parent-owned consent; check the request signal after awaits and dismiss on abort. */ beforeAccountChange?: (accountId: string | null, signal: AbortSignal) => Promise; sessionAccount?: { get(): Promise<{ ok: true; value: SessionAccountView; } | { ok: false; error: unknown; }>; set(accountId: string | null, revision: number): Promise<{ ok: true; value: SessionAccountView; } | { ok: false; error: unknown; }>; }; } /** Mounted only for a proven effective Copilot selection in the owning Session. */ export declare function CopilotUsageCard(props: CopilotUsageCardProps): ReactElement; //# sourceMappingURL=copilot-usage-card.d.ts.map