import { DraftOrder, OrderId, Order } from '@orderlyshop/core-client';
import { C as CheckoutProfile } from './types-CeigwmOf.js';
import './query.js';

interface BasketStore {
    load(): DraftOrder | undefined | Promise<DraftOrder | undefined>;
    save(draft: DraftOrder): void | Promise<void>;
    clear(): void | Promise<void>;
}
interface CheckoutProfileStore {
    load(): CheckoutProfile | undefined | Promise<CheckoutProfile | undefined>;
    save(profile: CheckoutProfile): void | Promise<void>;
    clear(): void | Promise<void>;
}
interface OrderStore {
    load(orderId: OrderId | string): Order | undefined | Promise<Order | undefined>;
    save(order: Order): void | Promise<void>;
    clear(orderId?: OrderId | string): void | Promise<void>;
}
declare const defaultBasketStorageKey = "orderly.web-components.basket.v1";
declare const defaultCheckoutProfileStorageKey = "orderly.web-components.checkout-profile.v1";
declare const defaultOrderStorageKey = "orderly.web-components.orders.v1";
declare class MemoryBasketStore implements BasketStore {
    private draft?;
    load(): DraftOrder | undefined;
    save(draft: DraftOrder): void;
    clear(): void;
}
declare class LocalStorageBasketStore implements BasketStore {
    private readonly key;
    constructor(key?: string);
    load(): DraftOrder | undefined;
    save(draft: DraftOrder): void;
    clear(): void;
}
declare class MemoryCheckoutProfileStore implements CheckoutProfileStore {
    private profile?;
    load(): CheckoutProfile | undefined;
    save(profile: CheckoutProfile): void;
    clear(): void;
}
declare class MemoryOrderStore implements OrderStore {
    private readonly orders;
    load(orderId: OrderId | string): Order | undefined;
    save(order: Order): void;
    clear(orderId?: OrderId | string): void;
}
declare class LocalStorageOrderStore implements OrderStore {
    private readonly key;
    constructor(key?: string);
    load(orderId: OrderId | string): Order | undefined;
    save(order: Order): void;
    clear(orderId?: OrderId | string): void;
    private loadOrders;
}
declare class LocalStorageCheckoutProfileStore implements CheckoutProfileStore {
    private readonly key;
    constructor(key?: string);
    load(): CheckoutProfile | undefined;
    save(profile: CheckoutProfile): void;
    clear(): void;
}
declare function createEmptyDraftOrder(): DraftOrder;
declare function sanitizeCheckoutProfile(profile: Partial<CheckoutProfile> | undefined): CheckoutProfile;
declare function checkoutProfileFromDraft(draft: DraftOrder | undefined): CheckoutProfile;
declare function encodeOrderId(orderId: OrderId): string;
declare function decodeOrderId(value: string): OrderId | undefined;

export { type BasketStore, type CheckoutProfileStore, LocalStorageBasketStore, LocalStorageCheckoutProfileStore, LocalStorageOrderStore, MemoryBasketStore, MemoryCheckoutProfileStore, MemoryOrderStore, type OrderStore, checkoutProfileFromDraft, createEmptyDraftOrder, decodeOrderId, defaultBasketStorageKey, defaultCheckoutProfileStorageKey, defaultOrderStorageKey, encodeOrderId, sanitizeCheckoutProfile };
