import { ChainId, ContractRequests, GraphQLRequests } from '@dodoex/api'; import { EmptyDataIcon, PaletteMode, ThemeOptions } from '@dodoex/components'; import { PropsWithChildren } from 'react'; import { APIServices } from '../../constants/api'; import { SupportedLang } from '../../constants/locales'; import { Web3ConnectorsProps } from '../../hooks/ConnectWallet'; import { ExecutionProps } from '../../hooks/Submission'; import { DefaultTokenInfo, TokenInfo } from '../../hooks/Token/type'; import { InitTokenListProps } from '../../hooks/Token/useInitTokenList'; import { ConfirmProps } from '../Confirm'; import { DialogProps } from '../Swap/components/Dialog'; import { Page } from '../../router'; import { ExecutionCtx } from '../../hooks/Submission/types'; import { TokenPickerDialogProps } from '../Swap/components/TokenCard/TokenPickerDialog'; export declare const WIDGET_CLASS_NAME = "dodo-widget-container"; export interface WidgetProps extends Web3ConnectorsProps, InitTokenListProps, ExecutionProps { apikey?: string; theme?: PartialDeep; colorMode?: PaletteMode; defaultChainId?: ChainId; width?: string | number; height?: string | number; feeRate?: number; rebateTo?: string; defaultFromToken?: DefaultTokenInfo; defaultToToken?: DefaultTokenInfo; locale?: SupportedLang; swapSlippage?: number | null; bridgeSlippage?: number | null; apiServices?: Partial; crossChain?: boolean; noPowerBy?: boolean; noDocumentLink?: boolean; onlyChainId?: ChainId; supportChainIds?: number[]; noUI?: boolean; noLangProvider?: boolean; noAutoConnect?: boolean; routerPage?: Page; dappMetadata?: { name: string; logoUrl?: string; }; notSupportPMM?: boolean; supportAMMV2?: boolean; supportAMMV3?: boolean; executionDialogExtra?: any; /** When the winding status changes, no pop-up window will be displayed. */ noSubmissionDialog?: boolean; showSubmissionSubmittedDialog?: boolean; onProviderChanged?: (provider?: any) => void; getStaticJsonRpcProviderByChainId?: Exclude[0], undefined>['getProvider']; widgetRef?: React.RefObject; /** If true is returned, the default wallet connection logic will not be executed */ onConnectWalletClick?: () => boolean | Promise; onSwitchChain?: (chainId?: ChainId) => Promise; /** When the token balance is insufficient, users can purchase or swap callbacks */ gotoBuyToken?: (params: { token: TokenInfo; account: string; }) => void; getTokenLogoUrl?: (params: { address?: string; width?: number; height?: number; url?: string; chainId?: number; }) => string; onSharePool?: (share: { chainId: number; baseToken?: { address: string; symbol: string; }; quoteToken?: { address: string; symbol: string; }; poolId: string; apy?: { miningBaseApy?: any; miningQuoteApy?: any; transactionBaseApy?: any; transactionQuoteApy?: any; } | null; isSingle?: boolean; }) => void; graphQLRequests?: GraphQLRequests; ConfirmComponent?: React.FunctionComponent; DialogComponent?: React.FunctionComponent; EmptyDataIcon?: React.FunctionComponent[0]>; TokenPickerDialog?: React.FunctionComponent; /** Default deadLine when it cannot be set. Unit: seconds */ deadLine?: number; submission?: ExecutionCtx; disableConnectedProviderRead?: boolean; } export { LangProvider } from '../../providers/i18n'; export { default as Message } from '../Message'; /** Widgets that do not directly import themes and queryClient libraries */ export declare function UnstyleWidget(props: PropsWithChildren): import("react").JSX.Element; export declare function Widget(props: PropsWithChildren): import("react").JSX.Element;