import { Locator, Page } from '@playwright/test';
export type CreditBalancePlan = 'Free' | 'Trial' | 'Premium';
/**
 * Reads `current_tenant` from localStorage and returns its `show_paywall` flag.
 * Returns false if the entry is missing, malformed, or the flag is unset.
 */
export declare function getCurrentTenantShowPaywall(page: Page): Promise<boolean>;
/** Locator for the credit-balance trigger button (icon in the nav). */
export declare function creditBalanceTrigger(page: Page): Locator;
/** Locator for the credit-balance dropdown panel (rendered in a Radix portal). */
export declare function creditBalancePanel(page: Page): Locator;
/** Locator for the plan badge (Free / Trial / Premium) inside the open panel. */
export declare function creditBalancePlanBadge(page: Page): Locator;
/**
 * Asserts the credit-balance trigger is visible iff the current tenant has
 * `show_paywall=true`. Returns the resolved expectation so callers can branch.
 */
export declare function expectCreditBalanceVisibilityForTenant(page: Page): Promise<{
    shouldBeVisible: boolean;
}>;
/**
 * Opens the credit-balance dropdown if not already open, waits for the panel
 * to be visible, and waits for the initial "Loading credits..." placeholder to
 * clear so callers can immediately read content. Idempotent — safe to call
 * when the panel is already up.
 */
export declare function openCreditBalanceDropdown(page: Page): Promise<Locator>;
/**
 * Waits for the "Loading credits..." placeholder to disappear from the open
 * panel. Resolves in the success path (real content rendered) or the error
 * path ("Unable to load credit balance." rendered) — both replace the loading
 * row. Returns immediately if the placeholder was never present.
 */
export declare function waitForCreditBalanceLoaded(page: Page): Promise<void>;
/** Closes the credit-balance dropdown via Escape and waits for it to detach. */
export declare function closeCreditBalanceDropdown(page: Page): Promise<void>;
/**
 * Reads the plan label text from the open panel. Returns null if the badge is
 * not rendered (e.g. billing data still loading or errored).
 */
export declare function getCreditBalancePlanLabel(page: Page): Promise<CreditBalancePlan | null>;
/**
 * Reads the "Remaining" credits value from the open panel ("X,XXX Credits").
 * Returns null when the row is not rendered or unparseable.
 */
export declare function getCreditBalanceRemaining(page: Page): Promise<number | null>;
/**
 * Free plan UI: Upgrade Plan only. No payment buttons. No auto-recharge section.
 */
export declare function expectCreditBalancePanelForFreePlan(page: Page): Promise<void>;
/**
 * Trial plan UI: Upgrade Plan only. No Manage Usage / Add Credits / Manage Billing.
 */
export declare function expectCreditBalancePanelForTrialPlan(page: Page): Promise<void>;
/**
 * Premium plan UI: Upgrade Plan must NOT appear.
 *  - With payment method: Manage Usage + Add Credits both visible; Manage Billing hidden.
 *  - Without payment method: Manage Billing visible; Manage Usage + Add Credits hidden.
 */
export declare function expectCreditBalancePanelForPremiumPlan(page: Page, options: {
    hasPaymentMethod: boolean;
}): Promise<void>;
/**
 * Convenience: opens the dropdown, detects the active plan from the badge,
 * and runs the matching state assertions on the already-open panel. Returns
 * the detected plan label.
 *
 * For Premium plans you may pass `hasPaymentMethod` to assert the specific
 * sub-state; if omitted on Premium, only the "no Upgrade Plan button" check runs.
 */
export declare function expectCreditBalanceForCurrentPlan(page: Page, options?: {
    hasPaymentMethod?: boolean;
}): Promise<CreditBalancePlan>;
