export interface EvokeAppBy {
  url: string;
  type: 'Scheme' | 'Link' | 'Intent';
}
export type SuccessCb = (evokeAppBy?: EvokeAppBy) => void;
export interface CallappConfig {
  fallback?: () => void;
  delay?: number;
  fallbackUrl?: string;
  successCb?: SuccessCb;
  resultJudgmentTime?: number;
}
export interface CallappOptions
  extends Omit<CallappConfig, 'successCb' | 'resultJudgmentTime'> {
  scheme?: string;
  intent?: {
    package?: string;
    scheme: string;
    fallbackUrl?: string;
  };
  link?: string;
  params?: Record<string, any>;
}
export type Hidden =
  | 'hidden'
  | 'webkitHidden'
  | 'msHidden'
  | 'mozHidden'
  | undefined;
export type VisibilityChange =
  | 'visibilitychange'
  | 'webkitvisibilitychange'
  | 'msvisibilitychange'
  | 'mozvisibilitychange'
  | undefined;
export interface EvokeAppResultOptions {
  evokeAppBy: EvokeAppBy;
  successCb?: SuccessCb;
  timeout?: number;
}
export interface OpenWalletConfig extends CallappConfig {
  walletName: string;
}
export interface OpenWalletOptions extends CallappOptions {
  walletName: string;
}
