import type { Component } from 'vue'; import { ComponentOptionsMixin } from 'vue'; import { CSSProperties } from 'vue'; import { DefineComponent } from 'vue'; import { ExtractPropTypes } from 'vue'; import type { Plugin as Plugin_2 } from 'vue'; import { PropType } from 'vue'; import { PublicProps } from 'vue'; declare type __VLS_NonUndefinedable = T extends undefined ? never : T; declare type __VLS_Prettify = { [K in keyof T]: T[K]; } & {}; declare type __VLS_TypePropsToOption = { [K in keyof T]-?: {} extends Pick ? { type: PropType<__VLS_NonUndefinedable>; } : { type: PropType; required: true; }; }; declare type __VLS_WithDefaults = { [K in keyof Pick]: K extends keyof D ? __VLS_Prettify : P[K]; }; declare type CnFunction = (...classes: Array) => string; declare type ExternalToast = Omit, 'id' | 'type' | 'title' | 'promise' | 'delete'> & { id?: number | string; }; declare const plugin: Plugin_2; export default plugin; declare type Position = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'top-center' | 'bottom-center'; declare type PromiseData = ExternalToast & { loading?: string | Component; success?: (data: ToastData) => string | Component; error?: (data: ToastData) => string | Component; description?: string | Component | ((data: any) => Component | string); finally?: () => void | Promise; }; declare type PromiseT = Promise | (() => Promise); declare type Theme = 'light' | 'dark' | 'system'; export declare const toast: ((message: string | Component, data?: ExternalToast) => string | number) & { success: (message: string | Component, data?: ExternalToast) => string | number; info: (message: string | Component, data?: ExternalToast) => string | number; warning: (message: string | Component, data?: ExternalToast) => string | number; error: (message: string | Component, data?: ExternalToast) => string | number; custom: (component: Component, data?: ExternalToast) => string | number; message: (message: string | Component, data?: ExternalToast) => string | number; promise: (promise: PromiseT, data?: PromiseData | undefined) => string | number | undefined; dismiss: (id?: number | string) => string | number | undefined; loading: (message: string | Component, data?: ExternalToast) => string | number; }; declare type ToastAction = { label: string | Component; onClick: (event: MouseEvent, toast: { dismiss: (delay?: number) => void; }) => void; classes?: string; }; declare interface ToastClasses { toast?: string; title?: string; description?: string; loader?: string; closeButton?: string; cancelButton?: string; actionButton?: string; normal?: string; action?: string; success?: string; error?: string; info?: string; warning?: string; loading?: string; default?: string; } export declare const Toaster: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption, { invert: boolean; position: string; hotkey: () => string[]; expand: boolean; closeButton: boolean; class: string; offset: string; theme: string; richColors: boolean; duration: number; style: () => {}; visibleToasts: number; toastOptions: () => {}; dir: string; gap: number; containerAriaLabel: string; pauseWhenPageIsHidden: boolean; }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly, { invert: boolean; position: string; hotkey: () => string[]; expand: boolean; closeButton: boolean; class: string; offset: string; theme: string; richColors: boolean; duration: number; style: () => {}; visibleToasts: number; toastOptions: () => {}; dir: string; gap: number; containerAriaLabel: string; pauseWhenPageIsHidden: boolean; }>>>, { invert: boolean; closeButton: boolean; duration: number; style: CSSProperties; class: string; position: Position; gap: number; visibleToasts: number; pauseWhenPageIsHidden: boolean; theme: Theme; hotkey: string[]; richColors: boolean; expand: boolean; toastOptions: ToastOptions; offset: string | number; dir: "rtl" | "ltr" | "auto"; containerAriaLabel: string; }, {}>; export declare interface ToasterProps { invert?: boolean; theme?: Theme; position?: Position; hotkey?: string[]; richColors?: boolean; expand?: boolean; duration?: number; gap?: number; visibleToasts?: number; closeButton?: boolean; toastOptions?: ToastOptions; class?: string; style?: CSSProperties; offset?: string | number; dir?: 'rtl' | 'ltr' | 'auto'; icons?: ToastIcons; containerAriaLabel?: string; pauseWhenPageIsHidden?: boolean; cn?: CnFunction; } declare interface ToastIcons { success?: Component; info?: Component; warning?: Component; error?: Component; loading?: Component; } declare interface ToastOptions { class?: string; closeButton?: boolean; descriptionClass?: string; style?: CSSProperties; cancelButtonStyle?: CSSProperties; actionButtonStyle?: CSSProperties; duration?: number; unstyled?: boolean; classes?: ToastClasses; } declare type ToastT = { id: number | string; title?: string | Component; type?: ToastTypes; icon?: Component; component?: T; componentProps?: any; invert?: boolean; closeButton?: boolean; dismissible?: boolean; description?: string | Component; duration?: number; delete?: boolean; important?: boolean; action?: ToastAction | ToastAction[]; cancel?: { label: string | Component; onClick?: () => void; }; onDismiss?: (toast: ToastT) => void; onAutoClose?: (toast: ToastT) => void; promise?: PromiseT; cancelButtonStyle?: CSSProperties; actionButtonStyle?: CSSProperties; style?: CSSProperties; unstyled?: boolean; class?: string; classes?: ToastClasses; descriptionClass?: string; position?: Position; }; declare type ToastTypes = 'normal' | 'action' | 'success' | 'info' | 'warning' | 'error' | 'loading' | 'default'; export { }