import React from 'react';
import { ProductDTO, ProductVariantDTO, AttributeRuleDTO, ProductAttributeDraftDTO, SelectedOptionDTO, ReviewRatingStatisticsDTO } from '@sentecacommerce/sdk';
import { SelectedOptionType } from './utils';
import { getProductBySlugConfig } from '../../api/productsApi';
import { AssetsMap } from '../../utils/assetsToMap';
export interface OptionsType {
    definitionKey: string;
    label: string;
    elements?: SubOptionType[];
}
export interface SubOptionType {
    optionKey: string;
    label: string;
    imageIndex?: number;
}
export interface ContentType {
    name?: string;
    content?: string;
}
export interface MetaInfoCategoryType {
    name: string;
    id: string;
    link: string;
}
export interface MetaInformationType {
    _id?: string;
    name?: string;
    slug?: string;
    description?: string;
    shortDescription?: string;
    reviewRatingStatistics?: ReviewRatingStatisticsDTO;
    brand: {
        _id?: string;
        name?: string;
        slug?: string;
        logo?: string;
    };
    category: {
        _id?: string;
        name?: string;
        slug?: string;
    };
    rootCategory: {
        _id?: string;
        name?: string;
        slug?: string;
    };
    categories?: MetaInfoCategoryType[];
    content?: ContentType[];
    assets?: AssetsMap;
}
interface SeoInformationType {
    title?: string;
    description?: string;
    keywords?: string;
}
interface AttributeRulesType extends AttributeRuleDTO {
    label: string;
    values: {
        [id: string]: {
            label: string;
            extra: any;
            combinations: {
                [id: string]: string;
            };
        };
    };
}
export interface VariantType extends Omit<ProductVariantDTO, 'attributes' | 'availableOptions' | 'selectedOptions' | 'labels'> {
    attributes: ProductAttributeDraftDTO[];
    options?: OptionsType[];
    selectedOptions: SelectedOptionDTO[];
    mappedSelectedOptions?: SelectedOptionType[];
    isAvailable: boolean;
    quantity?: number;
    inventory: {
        hasAvailableQuantity?: boolean;
        availableQuantity?: number;
    };
    labels?: string[];
    getAttribute: (rule: string) => {
        id: string;
        label: string;
        name: string;
        extra: any;
        combinations: {
            [id: string]: string;
        };
    };
    getAttributeByKey: (key: string) => undefined | any;
    getAvailabilityByStore: () => InventoryAvailabilityType[] | undefined;
}
interface VariantMap {
    [productId: string]: VariantType;
}
export interface BooleanKVP {
    [sku: string]: boolean | undefined;
}
export interface AttributeRulesMap {
    [name: string]: AttributeRulesType;
}
export interface CombinationsMap {
    [id: string]: {
        value: string;
        params: {
            [id: string]: string;
        };
    };
}
export interface InventoryAvailabilityType {
    storeName: string;
    availableQuantity: number;
    acceptsBackorders: boolean;
    restockableInDays: number;
}
declare type ProductProviderProps = {
    children: React.ReactNode;
    product?: ProductDTO;
    defaultVariantId?: string;
    query?: {
        storeKey?: string;
        currencyCode?: string;
        languageCode?: string;
        priceListKey?: string;
        time?: number;
        merchantKey?: string;
        expand?: string;
        project?: string;
    };
};
declare type ProductStateContextType = {
    attributeRules: AttributeRulesMap;
    metaData: MetaInformationType;
    seoData: SeoInformationType;
    variants?: VariantMap;
    selectedVariant?: VariantType | null;
};
export declare type VideoType = {
    type: string;
    source: string;
    iframe: JSX.Element;
    thumb: {
        url: string;
    };
};
declare type CountFunctionsContextType = {
    selectVariantById: (id: string) => void;
    selectVariantByAttribute: (key: string) => void;
    selectVariantByCombination: (key: string, value: string) => void;
    selectVariantOptions: (optionId: string, elementId: string) => void;
    getVariantById: (id: string) => VariantType;
    getVariantByAttribute: (key: string) => VariantType;
    getVariantByCombination: (key: string, value: string) => VariantType;
    getCustomFieldValue: (field: string) => boolean | undefined;
    getCombinationsForAttributeRule: (key: string, id: string) => {
        label: string;
        extra: any;
        combinations: {
            [id: string]: string;
        };
    };
    getProductVideos: () => VideoType[];
};
export declare function ProductProvider({ product, children, defaultVariantId, }: ProductProviderProps): JSX.Element;
export declare function useProductState(): ProductStateContextType;
export declare function useProductFunctions(): CountFunctionsContextType;
export declare function useProduct(slug: string, config?: getProductBySlugConfig): import("react-query").QueryResult<ProductDTO, unknown>;
export {};
