import Service from '@ember/service'; import { type NativeArray } from '@ember/array'; import type { ComponentLike } from '@glint/template'; import type { AuAlertSignature } from '../components/au-alert'; export interface BaseOptions { icon?: string | ComponentLike<{ Element: Element; }>; closable?: boolean; timeOut?: number | null; } export interface ToastOptions extends BaseOptions { type?: AuAlertSignature['Args']['skin']; } export interface CustomToastSignature { Args: { options: Options; close: () => void; }; } export type DefaultToastData = { component?: undefined; title?: string; message?: string; options: ToastOptions; }; export type CustomToastData = { component: ComponentLike>; title?: string; message?: string; options: Options; }; export type ToastData = DefaultToastData | CustomToastData; export default class ToasterService extends Service { toasts: NativeArray; private displayToast; show(component: ComponentLike>, options?: Options): CustomToastData; notify(message: string, title: string, options?: ToastOptions): DefaultToastData; success(message: string, title: string, options?: ToastOptions): DefaultToastData; warning(message: string, title: string, options?: ToastOptions): DefaultToastData; error(message?: string, title?: string, options?: ToastOptions): DefaultToastData; loading(message?: string, title?: string, options?: ToastOptions): DefaultToastData; close(toast: ToastData): void; } declare module '@ember/service' { interface Registry { toaster: ToasterService; } } //# sourceMappingURL=toaster.d.ts.map