import React, { FC, PropsWithChildren, ReactNode } from "react";
import { ConfigProviderProps } from "@orderly.network/hooks";
import { IContract } from "@orderly.network/core";
import { FooterStatusBarProps } from "../block/systemStatusBar/index";
import { ShareConfigProps } from "../block/shared/shareConfigProps";
import { Chains } from "@orderly.network/hooks/esm/orderly/useChains";
import { DesktopDropMenuItem } from "../block/accountStatus/desktop/accountStatus.desktop";
import { TopNavbarProps } from "../page/common/topNavbar";
export type AppStateErrors = {
    ChainNetworkNotSupport: boolean;
    IpNotSupport: boolean;
    NetworkError: boolean;
};
type Logo = {
    img?: string;
    component?: ReactNode;
    className?: string;
};
export type AppLogos = Partial<{
    main: Logo;
    secondary: Logo;
}>;
export type ReferralProps = {
    saveRefCode?: boolean;
    onClickReferral?: () => void;
    onBoundRefCode?: (success: boolean, error: any) => void;
    refLink?: string;
    slogan?: string;
};
export type CommonOrderlyAppState = {
    theme: any;
    brokerName?: string;
    shareOptions: ShareConfigProps;
    /** custom chains  */
    customChains?: Chains<undefined, undefined>;
    onChainChanged?: (chainId: number, isTestnet: boolean) => void;
    topBar?: ReactNode;
    /** compatible with appIcons field */
    topBarProps?: TopNavbarProps;
    appIcons?: AppLogos;
    footerStatusBarProps?: FooterStatusBarProps;
    accountMenuItems?: DesktopDropMenuItem[] | React.ReactNode;
    onClickAccountMenuItem?: (item: DesktopDropMenuItem) => void;
    referral?: ReferralProps;
};
export type OrderlyAppContextState = CommonOrderlyAppState & {
    onWalletConnect: () => Promise<any>;
    onWalletDisconnect: () => Promise<any>;
    onSetChain: (chainId: number) => Promise<any>;
    errors: AppStateErrors;
};
export declare const OrderlyAppContext: React.Context<OrderlyAppContextState>;
export type OrderlyAppProviderProps = CommonOrderlyAppState & {
    toastLimitCount?: number;
    contracts?: IContract;
    /**
     * are include testnet chains
     */
    includeTestnet?: boolean;
    referral?: ReferralProps;
};
export declare const OrderlyAppProvider: FC<PropsWithChildren<OrderlyAppProviderProps & ConfigProviderProps>>;
export {};
//# sourceMappingURL=appProvider.d.ts.map