import { CustomerInfo } from '../types';
import { PurchasesOfferings } from '../revenuecat-types';
export interface StoreProduct {
    id: string;
    price: number;
    priceString: string;
    title: string;
    description?: string;
    currency?: string;
    platform?: string;
}
export interface CommerceState {
    isInitialized: boolean;
    isInitializing: boolean;
    userId: string | null;
    offerings: PurchasesOfferings;
    customerInfo: CustomerInfo | null;
    storeProducts: StoreProduct[];
    isPurchasing: boolean;
    isRestoring: boolean;
    lastError: Error | null;
}
export type CommerceStateListener = (state: CommerceState) => void;
declare class CommerceStateManager {
    private state;
    private listeners;
    getState(): Readonly<CommerceState>;
    getCustomerInfo(): CustomerInfo | null;
    getOfferings(): PurchasesOfferings;
    getUserId(): string | null;
    getStoreProducts(): StoreProduct[];
    isReady(): boolean;
    isPremium(): boolean;
    _updateState(partial: Partial<CommerceState>): void;
    _setUserId(userId: string | null): void;
    _setCustomerInfo(customerInfo: CustomerInfo | null): void;
    _setOfferings(offerings: PurchasesOfferings): void;
    _setStoreProducts(storeProducts: StoreProduct[]): void;
    _setInitialized(isInitialized: boolean): void;
    _setInitializing(isInitializing: boolean): void;
    _setPurchasing(isPurchasing: boolean): void;
    _setRestoring(isRestoring: boolean): void;
    _setError(error: Error | null): void;
    _reset(): void;
    subscribe(listener: CommerceStateListener): () => void;
    private _notifyListeners;
    private _hasStateChanged;
}
export declare const commerceState: CommerceStateManager;
export {};
//# sourceMappingURL=commerceState.d.ts.map