import { TeleportProps } from 'vue'; type ToastMessage = string | number; type ToastType = 'text' | 'loading' | 'success' | 'fail' | 'html'; type ToastPosition = 'top' | 'middle' | 'bottom'; type ToastLoadingType = 'circular' | 'spinner'; export type ToastOptions = { icon?: string; type?: ToastType; mask?: boolean; message?: ToastMessage; onClose?: () => void; onOpened?: () => void; overlay?: boolean; duration?: number; teleport?: TeleportProps['to']; position?: ToastPosition; className?: any; transition?: string; iconPrefix?: string; loadingType?: ToastLoadingType; forbidClick?: boolean; closeOnClick?: boolean; overlayClass?: any; overlayStyle?: Record; closeOnClickOverlay?: boolean; }; export interface VanToast { type: ToastType; position: ToastPosition; loadingType: ToastLoadingType; forbidClick: boolean; message: ToastMessage; clear(): void; } export interface Toast { (message: ToastOptions | ToastMessage, options?: ToastOptions): VanToast; loading(options?: ToastOptions | ToastMessage): VanToast; success(options?: ToastOptions | ToastMessage): VanToast; fail(options?: ToastOptions | ToastMessage): VanToast; clear(all?: boolean): void; install(): void; setDefaultOptions( type: ToastType | ToastOptions, options?: ToastOptions ): void; resetDefaultOptions(options?: string): void; allowMultiple(allow: boolean): void; } declare module '@vue/runtime-core' { interface ComponentCustomProperties { $toast: Toast; } } export const Toast: Toast;