import { EventDispatcher } from "@ribajs/events";
import { PQueue } from "./p-queue.service.js";
import { ShopifyCartLineItem, ShopifyCartUpdateProperty, ShopifyCartAddError, ShopifyCartObject, ShopifyCustomerAddress, ShopifyShippingRates, ShopifyShippingRatesNormalized } from "../interfaces/index.js";
export interface ShopifyCartRequestOptions {
    triggerOnStart: boolean;
    triggerOnComplete: boolean;
    triggerOnChange: boolean;
}
export declare class ShopifyCartService {
    static queue: PQueue;
    static cart: ShopifyCartObject | null;
    static shopifyCartEventDispatcher: EventDispatcher;
    static updateExtern(options?: ShopifyCartRequestOptions): Promise<void>;
    static add(id: number, quantity?: number, properties?: {}, options?: ShopifyCartRequestOptions): Promise<ShopifyCartLineItem | ShopifyCartAddError>;
    static refresh(): Promise<ShopifyCartObject>;
    static _get(): Promise<ShopifyCartObject>;
    static get(options?: ShopifyCartRequestOptions): Promise<ShopifyCartObject>;
    static update(id: number | number, quantity: number, properties?: {}, options?: ShopifyCartRequestOptions): Promise<ShopifyCartObject>;
    static updates(updates: ShopifyCartUpdateProperty | Array<number>, options?: ShopifyCartRequestOptions): Promise<ShopifyCartObject>;
    static change(id: number | number, quantity: number, properties?: {}, options?: ShopifyCartRequestOptions): Promise<ShopifyCartObject>;
    static changeLine(line: string | number, quantity: number, properties?: {}, options?: ShopifyCartRequestOptions): Promise<ShopifyCartObject>;
    static clear(options?: ShopifyCartRequestOptions): Promise<ShopifyCartObject>;
    static _getShippingRates(shippingAddress: ShopifyCustomerAddress, normalize?: boolean): Promise<ShopifyShippingRates | ShopifyShippingRatesNormalized>;
    static getShippingRates(shippingAddress: ShopifyCustomerAddress, normalize?: boolean, options?: ShopifyCartRequestOptions): Promise<ShopifyShippingRates | ShopifyShippingRatesNormalized>;
    protected static CART_POST_ADD_URL: string;
    protected static CART_GET_URL: string;
    protected static CART_POST_UPDATE_URL: string;
    protected static CART_POST_CHANGE_URL: string;
    protected static CART_POST_CLEAR_URL: string;
    protected static CART_GET_SHIPPING_RATES_URL: string;
    protected static requestOptionDefaults: {
        triggerOnStart: boolean;
        triggerOnComplete: boolean;
        triggerOnChange: boolean;
    };
    protected static waitForComplete: boolean;
    protected static triggerOnComplete(): Promise<void> | undefined;
    protected static triggerOnChange(cart: ShopifyCartObject): void;
    protected static triggerOnStart(): void;
    protected static triggerAdd(id: number, quantity: number, properties: any): void;
    protected static normalizeShippingRates(shippingRates: ShopifyShippingRates): ShopifyShippingRatesNormalized;
}
