import * as React from 'react'; import { ReactNode } from 'react'; import { j as StripeSubscriptionInterface, P as PaymentMethodInterface, S as StripeCustomerInterface, a as StripeInvoiceInterface, M as MeterInterface, o as MeterSummaryInterface, d as StripePriceInterface, f as StripePriceInput, g as StripeProductInterface, h as StripeProductInput, I as InvoiceStatus, b as ProrationPreviewInterface, i as SubscriptionStatus, n as StripeUsageInterface, q as PromotionCodeValidationResult } from '../stripe-promotion-code.interface-ClZ7DxS9.mjs'; import { J as JsonApiHydratedDataInterface } from '../ApiDataInterface-BcZeXy5X.mjs'; import '../feature.interface-CXb1-vNq.mjs'; type SubscriptionSummaryCardProps = { subscriptions: StripeSubscriptionInterface[]; loading?: boolean; error?: string; onManageClick: () => void; }; declare function SubscriptionSummaryCard({ subscriptions, loading, error, onManageClick, }: SubscriptionSummaryCardProps): React.JSX.Element; type PaymentMethodSummaryCardProps = { paymentMethods: PaymentMethodInterface[]; defaultPaymentMethodId?: string; loading?: boolean; error?: string; onManageClick: () => void; }; declare function PaymentMethodSummaryCard({ paymentMethods, defaultPaymentMethodId, loading, error, onManageClick, }: PaymentMethodSummaryCardProps): React.JSX.Element; type CustomerInfoCardProps = { customer: StripeCustomerInterface | null; loading?: boolean; error?: string; }; declare function CustomerInfoCard({ customer, loading, error }: CustomerInfoCardProps): React.JSX.Element; type InvoicesSummaryCardProps = { invoices: StripeInvoiceInterface[]; loading?: boolean; error?: string; onViewAllClick: () => void; }; declare function InvoicesSummaryCard({ invoices, loading, error, onViewAllClick }: InvoicesSummaryCardProps): React.JSX.Element; type BillingUsageSummaryCardProps = { meters: MeterInterface[]; summaries: Record; loading?: boolean; error?: string; onViewDetailsClick: () => void; }; declare function BillingUsageSummaryCard({ meters, summaries, loading, error, onViewDetailsClick, }: BillingUsageSummaryCardProps): React.JSX.Element; declare function BillingDashboardContainer(): React.JSX.Element; type BillingDetailModalProps = { open: boolean; onOpenChange: (open: boolean) => void; title: string; children: ReactNode; className?: string; }; declare function BillingDetailModal({ open, onOpenChange, title, children, className }: BillingDetailModalProps): React.JSX.Element; declare function StripeProvider({ children }: { children: ReactNode; }): React.JSX.Element; declare function isStripeConfigured(): boolean; /** * Format price recurring interval for display * @param price - Stripe price object * @returns Formatted interval string (e.g., "/month", "/year", "/2 weeks", "one-time") */ declare function formatInterval(price: StripePriceInterface): string; /** * Format currency amount from cents to localized currency string * @param amount - Amount in cents * @param currency - Currency code (e.g., "USD", "EUR", "GBP") * @returns Formatted currency string (e.g., "$9.99", "€9,99") */ declare function formatCurrency(amount: number | undefined, currency: string): string; /** * Format a date to a localized date string * @param date - Date object or ISO string * @returns Formatted date string (e.g., "Jan 15, 2025") */ declare function formatDate(date: Date | string | undefined): string; type BillingAlertBannerProps = { subscription: StripeSubscriptionInterface; onUpdatePayment?: () => void; onAddPayment?: () => void; }; declare function BillingAlertBanner({ subscription, onUpdatePayment, onAddPayment }: BillingAlertBannerProps): React.JSX.Element | null; interface PriceContextType { price: StripePriceInterface | undefined; setPrice: (value: StripePriceInterface | undefined) => void; reloadPrice: () => Promise; createPrice: (input: StripePriceInput) => Promise; updatePrice: (input: StripePriceInput) => Promise; archivePrice: (id?: string) => Promise; restorePrice: (id?: string) => Promise; /** Bumped by every mutation. Mounted lists re-fetch on it. */ priceVersion: number; refreshPrices: () => void; /** Product a newly created price attaches to. Set in list mode (prices tab). */ productId: string | undefined; } type PriceProviderProps = { children: ReactNode; dehydratedPrice?: JsonApiHydratedDataInterface; /** * Publish breadcrumbs + title into SharedProvider. Pass `false` when this * provider is mounted INSIDE another entity's page (the prices tab mounts * PriceProvider that way): SharedProvider replaces its value for the subtree * rather than merging (SharedContext.tsx:35-37), so a nested provider that * publishes chrome would blank the host page's title. */ publishChrome?: boolean; /** Required in list mode (the prices tab) so new prices attach to the right product. */ productId?: string; }; /** Human label for a price: its nickname, else amount + interval. */ declare function priceLabel(price: StripePriceInterface): string; declare const PriceProvider: ({ children, dehydratedPrice, publishChrome, productId: productIdProp, }: PriceProviderProps) => React.JSX.Element; declare const usePriceContext: () => PriceContextType; interface ProductContextType { product: StripeProductInterface | undefined; setProduct: (value: StripeProductInterface | undefined) => void; reloadProduct: () => Promise; createProduct: (input: StripeProductInput) => Promise; updateProduct: (input: StripeProductInput) => Promise; archiveProduct: (id?: string) => Promise; restoreProduct: (id?: string) => Promise; /** Bumped by every mutation. Mounted lists re-fetch on it. */ catalogueVersion: number; refreshCatalogue: () => void; } type ProductProviderProps = { children: ReactNode; dehydratedProduct?: JsonApiHydratedDataInterface; /** * Publish breadcrumbs + title into SharedProvider. Pass `false` when this * provider is mounted INSIDE another entity's page (the prices tab mounts * PriceProvider that way): SharedProvider replaces its value for the subtree * rather than merging (SharedContext.tsx:35-37), so a nested provider that * publishes chrome would blank the host page's title. */ publishChrome?: boolean; }; declare const ProductProvider: ({ children, dehydratedProduct, publishChrome }: ProductProviderProps) => React.JSX.Element; declare const useProductContext: () => ProductContextType; declare function PaymentMethodsContainer(): React.JSX.Element; type PaymentMethodCardProps = { paymentMethod: PaymentMethodInterface; onUpdate: () => void; }; declare function PaymentMethodCard({ paymentMethod, onUpdate }: PaymentMethodCardProps): React.JSX.Element; type PaymentMethodEditorProps = { open: boolean; onOpenChange: (open: boolean) => void; onSuccess: () => void; }; declare function PaymentMethodEditor({ open, onOpenChange, onSuccess }: PaymentMethodEditorProps): React.JSX.Element; type PaymentMethodFormProps = { onSuccess: () => void; onCancel: () => void; isLoading?: boolean; }; declare function PaymentMethodForm({ onSuccess, onCancel, isLoading }: PaymentMethodFormProps): React.JSX.Element; type PaymentMethodsListProps = { paymentMethods: PaymentMethodInterface[]; onUpdate: () => void; }; declare function PaymentMethodsList({ paymentMethods, onUpdate }: PaymentMethodsListProps): React.JSX.Element; declare function InvoicesContainer(): React.JSX.Element; type InvoiceDetailsProps = { invoice: StripeInvoiceInterface; open: boolean; onOpenChange: (open: boolean) => void; onInvoiceChange: () => void; }; declare function InvoiceDetails({ invoice, open, onOpenChange, onInvoiceChange: _onInvoiceChange, }: InvoiceDetailsProps): React.JSX.Element; type InvoicesListProps = { invoices: StripeInvoiceInterface[]; onInvoicesChange: () => void; }; declare function InvoicesList({ invoices, onInvoicesChange }: InvoicesListProps): React.JSX.Element; type InvoiceStatusBadgeProps = { status: InvoiceStatus; }; declare function InvoiceStatusBadge({ status }: InvoiceStatusBadgeProps): React.JSX.Element; declare function PriceContainer(): React.JSX.Element | null; declare function PriceDetails(): React.JSX.Element | null; type PriceArchiverProps = { price: StripePriceInterface; }; /** * Archive / restore control for a price. Built on ConfirmDialog, which is * controlled and trigger-less by design — the caller owns the trigger button, * so none of Base UI's trigger-composition pitfalls apply (no asChild, no * nested