/** * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ import { TemplateRef } from '@angular/core'; import { NgClassInterface, NgStyleInterface } from '@ui-vts-kit/ng-vts/core/types'; import { Subject } from 'rxjs'; export type VtsToastPlacement = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight'; export interface VtsToastDataOptions { vtsKey?: string; vtsStyle?: NgStyleInterface; vtsClass?: NgClassInterface | string; vtsPlacement?: VtsToastPlacement; vtsData?: T; vtsDuration?: number; vtsAnimate?: boolean; vtsPauseOnHover?: boolean; vtsShowIcon?: boolean; vtsTheme?: 'outline' | 'fill'; vtsCloseText?: TemplateRef | string; vtsIconType?: string; } export interface VtsToastData { content?: string | TemplateRef; createdAt?: Date; messageId?: string; options?: VtsToastDataOptions; state?: 'enter' | 'leave'; template?: TemplateRef<{}>; title?: string; type?: 'success' | 'info' | 'warning' | 'error'; onClose?: Subject; onClick?: Subject; showIcon?: boolean; theme?: 'outline' | 'fill'; closeText?: TemplateRef | string; iconType?: string; } export type VtsToastRef = Pick, 'onClose' | 'onClick' | 'messageId'>;