import * as _accelbyte_sdk_platform from '@accelbyte/sdk-platform';
import { ItemInfo, ItemPagingSlicedResult } from '@accelbyte/sdk-platform';
import { AccelbyteSDK } from '@accelbyte/sdk';
import { z } from 'zod';
import React$1 from 'react';

declare const ItemType: z.ZodEnum<["APP", "BUNDLE", "CODE", "COINS", "EXTENSION", "INGAMEITEM", "LOOTBOX", "MEDIA", "OPTIONBOX", "SEASON", "SUBSCRIPTION"]>;
declare type ItemType = z.infer<typeof ItemType>;
declare const AppType: z.ZodEnum<["DEMO", "DLC", "GAME", "SOFTWARE"]>;
declare type AppType = z.infer<typeof AppType>;

declare type FetcherProps = {
    sdk: AccelbyteSDK;
};
declare const currencyFetcher: ({ sdk }: FetcherProps) => Promise<{
    [k: string]: _accelbyte_sdk_platform.CurrencyInfo;
}>;
declare const storeFetcher: ({ sdk, isSingleGame, appId, country }: FetcherProps & {
    isSingleGame: boolean;
    appId: string;
    country?: string | undefined;
}) => Promise<{
    singleGame?: {
        itemLocale: _accelbyte_sdk_platform.PopulatedItemInfo;
        appInfo: _accelbyte_sdk_platform.AppInfo;
    } | undefined;
    currencyObject: Awaited<ReturnType<typeof currencyFetcher>>;
    isSingleGame: boolean;
}>;
declare const storeSingleGameFetcher: ({ sdk, appId, country }: FetcherProps & {
    appId: string;
    country?: string | undefined;
}) => Promise<{
    itemLocale: _accelbyte_sdk_platform.PopulatedItemInfo;
    appInfo: _accelbyte_sdk_platform.AppInfo;
}>;
declare const storeItemsFetcher: ({ sdk, queryParams }: FetcherProps & {
    queryParams: {
        appType?: AppType;
        region?: string;
        offset?: number;
        baseAppId?: string | null;
        itemType?: ItemType;
        page?: number;
        limit?: number;
        country?: string;
        language?: string;
        plan?: string;
    };
}) => Promise<_accelbyte_sdk_platform.ItemPagingSlicedResult>;
declare const storeDlcsIndexFetcher: ({ sdk, baseAppId }: FetcherProps & {
    baseAppId: string;
}) => Promise<_accelbyte_sdk_platform.ItemPagingSlicedResult>;
declare const storeInGameItemsIndexFetcher: ({ sdk, baseAppId }: FetcherProps & {
    baseAppId: string;
}) => Promise<_accelbyte_sdk_platform.ItemPagingSlicedResult>;
declare const storeOptionBoxesIndexFetcher: ({ sdk, isSingleGame, baseAppId, page }: FetcherProps & {
    isSingleGame: boolean;
    baseAppId?: string | undefined;
    page: number;
}) => Promise<_accelbyte_sdk_platform.ItemPagingSlicedResult>;
declare const storeAppsIndexFetcher: ({ sdk, page }: FetcherProps & {
    page: number;
}) => Promise<_accelbyte_sdk_platform.ItemPagingSlicedResult>;
declare const storeBundlesIndexFetcher: ({ sdk, page }: FetcherProps & {
    page: number;
}) => Promise<_accelbyte_sdk_platform.ItemPagingSlicedResult>;
declare const storeCodesIndexFetcher: ({ sdk, page }: FetcherProps & {
    page: number;
}) => Promise<_accelbyte_sdk_platform.ItemPagingSlicedResult>;
declare const storeDetailFetcher: ({ sdk, itemId, baseAppId, country }: FetcherProps & {
    itemId: string;
    baseAppId?: string | undefined;
    country?: string | undefined;
}) => Promise<{
    itemLocale: _accelbyte_sdk_platform.PopulatedItemInfo;
    baseApp: _accelbyte_sdk_platform.ItemInfo;
} | {
    itemLocale: _accelbyte_sdk_platform.PopulatedItemInfo;
    baseApp: undefined;
}>;

interface StoreWidgetProps {
    children: ((props: {
        isSingleGame: boolean;
    }) => JSX.Element) | JSX.Element;
    initialData?: Awaited<ReturnType<typeof storeFetcher>>;
}
declare function StoreWidget({ children, initialData }: StoreWidgetProps): JSX.Element;

interface StoreEntryProps {
    children: JSX.Element;
}
declare function StoreEntry({ children }: StoreEntryProps): JSX.Element;

interface WidgetLinkObject {
    link: string;
    icon?: React.ReactNode;
    label: React.ReactNode;
    className?: string;
}

interface Props$8 {
    tabLinks: WidgetLinkObject[];
    children: React$1.ReactNode;
}
declare const MultipleGameStore: ({ tabLinks, children }: Props$8) => JSX.Element | null;

interface Props$7 {
    tabLinks: WidgetLinkObject[];
    children: React$1.ReactNode;
}
declare function SingleGameStore({ tabLinks, children }: Props$7): JSX.Element;

interface SingleGameStoreWrapperChildrenProps {
    baseItem: ItemInfo | null;
}
interface Props$6 {
    isPreviewMode?: boolean;
    children: ((props: SingleGameStoreWrapperChildrenProps) => React$1.ReactNode) | React$1.ReactNode;
}
declare function SingleGameStoreWrapper({ isPreviewMode, children }: Props$6): JSX.Element;

interface Props$5 {
    itemId: string | undefined;
    previewOptions?: {
        isSingleGame?: boolean;
        mode?: 'base' | 'checkout';
    };
    initialItemLocale?: ItemInfo;
}
declare const AppStoreDetailError: ({ error }: {
    error: Error | unknown;
}) => JSX.Element;
declare function AppStoreDetail({ itemId, previewOptions, initialItemLocale }: Props$5): JSX.Element;

interface Props$4 {
    itemId: string;
    initialItemLocale?: ItemInfo;
    initialBaseApp?: ItemInfo;
}
declare function BundleStoreDetail({ itemId, initialItemLocale, initialBaseApp }: Props$4): JSX.Element;

interface Props$3 {
    itemId: string;
    initialItemLocale?: ItemInfo;
    initialBaseApp?: ItemInfo;
}
declare function CodeStoreDetail({ itemId, initialItemLocale, initialBaseApp }: Props$3): JSX.Element;

interface Props$2 {
    itemId: string;
    initialItemLocale?: ItemInfo;
    previewMode?: 'checkout';
    initialBaseApp?: ItemInfo;
}
declare function DlcStoreDetail({ itemId, previewMode, initialItemLocale, initialBaseApp }: Props$2): JSX.Element;

interface Props$1 {
    itemId: string;
    initialItemLocale?: ItemInfo;
    initialBaseApp?: ItemInfo;
}
declare function IngameItemStoreDetail({ itemId, initialItemLocale, initialBaseApp }: Props$1): JSX.Element;

interface Props {
    itemId: string;
    initialItemLocale?: ItemInfo;
}
declare function OptionboxStoreDetail({ itemId, initialItemLocale }: Props): JSX.Element;

declare enum FetchStatus {
    IDLE = "idle",
    FETCHING = "fetching",
    CREATING = "creating",
    UPDATING = "updating",
    PURCHASING = "purchasing",
    CLAIMING = "claiming",
    REDEEMING = "redeeming",
    CANCELLING = "cancelling",
    REQUESTING = "requesting",
    VERIFYING = "verifying",
    DELETING = "deleting",
    DOWNLOADING = "downloading",
    SENDING = "sending"
}
declare type FetchErrorType = Error;

interface StoreListener<State = any> {
    id: string;
    setState: React.Dispatch<React.SetStateAction<State>>;
}
interface StoreContent<State = any> {
    state: State;
    initialState: State;
    subscribers: StoreListener<State>[];
}

interface ListStoreItemsState {
    items: ItemPagingSlicedResult | null;
    itemsFetchStatus: FetchStatus;
    itemsError: FetchErrorType | null;
}
declare const createStoreForItemsStore: () => StoreContent<ListStoreItemsState>;
declare type UseStoreItemsParams = ReturnType<typeof createStoreForItemsStore>;

interface BaseStoreProps {
    page: number;
    itemType: ItemType;
    pageSize?: number;
    country?: string;
    language?: string;
    plan?: string;
    baseAppId?: string;
    children?: React$1.ReactNode;
    store: UseStoreItemsParams;
    initialData?: ItemPagingSlicedResult;
}
declare type ExposedBaseStoreProps = Pick<BaseStoreProps, 'page' | 'pageSize' | 'country' | 'initialData'>;

interface BaseStoreCompactProps {
    baseItem: ItemInfo;
    language?: string;
    withWrapper?: (content: React$1.ReactNode) => React$1.ReactNode;
    noItemMessage?: React$1.ReactNode | string;
    loadingMessage?: React$1.ReactNode | string;
    itemType?: ItemType;
    appType?: AppType;
    pageSize?: number;
    country?: string;
    initialShownItem?: number;
    isPreviewMode?: boolean;
    store: UseStoreItemsParams;
    initialData?: ItemInfo[];
}

declare const AppStore: ({ pageSize, ...props }: ExposedBaseStoreProps) => JSX.Element;
declare const SingleGameAppStore: ({ baseItem, initialData }: {
    baseItem: BaseStoreCompactProps['baseItem'] | null;
    initialData?: ItemInfo[] | undefined;
}) => JSX.Element | null;

declare const CodeStore: ({ pageSize, ...props }: ExposedBaseStoreProps) => JSX.Element;

declare const BundleStore: ({ pageSize, ...props }: ExposedBaseStoreProps) => JSX.Element;
declare const SingleGameBundleStore: ({ baseItem }: {
    baseItem: BaseStoreCompactProps['baseItem'] | null;
}) => JSX.Element | null;

declare const SingleInGameItemsStore: ({ baseItem, initialData }: {
    baseItem: BaseStoreCompactProps['baseItem'] | null;
    initialData?: ItemInfo[] | undefined;
}) => JSX.Element | null;

declare const OptionboxStore: ({ pageSize, ...props }: ExposedBaseStoreProps) => JSX.Element;
declare const SingleGameOptionboxStore: ({ baseItem, initialData }: {
    baseItem: BaseStoreCompactProps['baseItem'] | null;
    initialData?: ItemInfo[] | undefined;
}) => JSX.Element | null;

declare class StoreConstants {
    static SINGLE_GAME_STORE_PAGE_SIZE: number;
    static MULTIPLE_GAME_STORE_PAGE_SIZE: number;
}

export { AppStore, AppStoreDetail, AppStoreDetailError, BundleStore, BundleStoreDetail, CodeStore, CodeStoreDetail, DlcStoreDetail, IngameItemStoreDetail, MultipleGameStore, OptionboxStore, OptionboxStoreDetail, SingleGameAppStore, SingleGameBundleStore, SingleGameOptionboxStore, SingleGameStore, SingleGameStoreWrapper, SingleGameStoreWrapperChildrenProps, SingleInGameItemsStore, StoreConstants, StoreEntry, StoreWidget, storeAppsIndexFetcher, storeBundlesIndexFetcher, storeCodesIndexFetcher, storeDetailFetcher, storeDlcsIndexFetcher, storeFetcher, storeInGameItemsIndexFetcher, storeItemsFetcher, storeOptionBoxesIndexFetcher, storeSingleGameFetcher };
