import type { subscriptions } from "@fluid-app/subscriptions-core";
import type { SubscriptionsDict } from "@fluid-app/subscriptions-core/translation-dictionary";
import type { TranslationApi } from "@fluid-app/i18n/translation-api";
export type T = TranslationApi<SubscriptionsDict>["t"];
export type FilterKey = "all" | "active" | "paused" | "cancelled";
export type StatusKind = "active" | "paused" | "cancelled" | "pending" | "past_due";
export interface MappedStatus {
    kind: StatusKind;
    label: string;
}
/**
 * Map a raw subscription `status` string from the BFF onto our internal
 * status vocabulary. Unknown statuses pass through with `kind: "pending"`
 * and a capitalized raw label — never synthesize a colored pill that
 * pretends to be real status data.
 */
export declare function mapStatus(status: string, t: T): MappedStatus;
/**
 * Sort priority — past-due first (urgent), cancelled last. Used to order
 * subscriptions within the active grid before the cancelled section.
 */
export declare const STATUS_PRIORITY: Record<StatusKind, number>;
/**
 * "Active" group = anything still actionable, including paused (can be
 * resumed). The cancelled section is reserved for cancelled subs only —
 * those are truly done and can't be acted on beyond viewing.
 */
export declare function isActiveKind(kind: StatusKind): boolean;
/**
 * Filter predicate — status-only, does not need translation so we use a
 * stripped-down identity helper that satisfies the `T` signature.
 */
export declare function filterPredicate(filter: FilterKey, sub: subscriptions.SubscriptionListItem): boolean;
/** Lightweight status-kind lookup that doesn't need `t`. */
export declare function mapStatusKindOnly(status: string): StatusKind;
export declare function countByFilter(list: subscriptions.SubscriptionListItem[]): Record<FilterKey, number>;
export declare function formatCadence(plan: subscriptions.SubscriptionListPlan, t: T): string;
export declare function pricingSuffix(plan: subscriptions.SubscriptionListPlan, t: T): string;
export declare function formatLongDate(iso: string): string;
/**
 * Render the per-cycle subscription bill amount (`price × quantity`).
 *
 * `sub.price` (mapped from the BFF's `total`) is the per-unit price, not the
 * line total — the variant column it ultimately reads from is a plain
 * decimal column, and the detail page also computes `price * quantity` for
 * its bill rows. At qty=1 the multiplication is a no-op so the bug stayed
 * hidden until qty>1 surfaced the mismatch with the detail view.
 */
export declare function formatPrice(sub: subscriptions.SubscriptionListItem): string;
/** Detail-shape counterpart for bundle member rows. */
export declare function formatDetailPrice(sub: subscriptions.SubscriptionDetailSubscription): string;
export interface DetailDiscountLine {
    code: string;
    label: string;
    amountLabel: string;
}
/**
 * Build the discount line shown beneath a detail subscription's price —
 * the active attached discount's code plus the renewal discount amount.
 * Returns `null` when no active attachment exists or the computed amount
 * is not positive. Mirrors `formatDetailPrice`'s no-symbol formatting:
 * the portal adapter currently sets `currency.symbol` to `null`, so the
 * amount renders bare unless a symbol is actually present.
 */
export declare function detailDiscountLine(sub: subscriptions.SubscriptionDetailSubscription, t: T): DetailDiscountLine | null;
export interface CycleProgress {
    /** 0..1 fraction of the cycle that has elapsed. */
    progress: number;
    /** "Last bill 18 days ago" — friendly label for the start of the cycle. */
    startLabel: string;
    /** "Bills in 12 days" — friendly label for the end of the cycle. */
    endLabel: string;
}
/**
 * Compute progress through a billing cycle. Returns `null` when either
 * date is missing, unparseable, or `end <= start`. `now` is injectable
 * for tests.
 */
export declare function computeCycleProgress(last: string | null, next: string | null, t: T, now?: number): CycleProgress | null;
export declare function friendlyDaysAgo(start: number, t: T, now?: number): string;
export declare function friendlyDaysAhead(end: number, t: T, now?: number): string;
//# sourceMappingURL=portal-subscriptions-list-helpers.d.ts.map