1 | /**
|
2 | * @license
|
3 | * Copyright Akveo. All Rights Reserved.
|
4 | * Licensed under the MIT License. See License.txt in the project root for license information.
|
5 | */
|
6 | import { InjectionToken } from '@angular/core';
|
7 | import { NbGlobalPosition } from '../cdk/overlay/position-helper';
|
8 | import { NbComponentOrCustomStatus, NbComponentStatus } from '../component-status';
|
9 | import { NbIconConfig } from '../icon/icon.component';
|
10 | type IconToClassMap = {
|
11 | [status in NbComponentStatus]: string;
|
12 | };
|
13 | export declare const NB_TOASTR_CONFIG: InjectionToken<NbToastrConfig>;
|
14 | export type NbDuplicateToastBehaviour = 'previous' | 'all';
|
15 | /**
|
16 | * The `NbToastrConfig` class describes configuration of the `NbToastrService.show` and global toastr configuration.
|
17 | * */
|
18 | export declare class NbToastrConfig {
|
19 | /**
|
20 | * Determines where on the screen toast have to be rendered.
|
21 | * */
|
22 | position: NbGlobalPosition;
|
23 | /**
|
24 | * Status chooses color scheme for the toast.
|
25 | * */
|
26 | status: NbComponentOrCustomStatus;
|
27 | /**
|
28 | * Duration is timeout between toast appears and disappears.
|
29 | * */
|
30 | duration: number;
|
31 | /**
|
32 | * Destroy by click means you can hide the toast by clicking it.
|
33 | * */
|
34 | destroyByClick: boolean;
|
35 | /**
|
36 | * If preventDuplicates is true then the toast with the same title, message and status will not be rendered.
|
37 | * Find duplicates behaviour determined by `preventDuplicates`.
|
38 | * The default `previous` duplicate behaviour is used.
|
39 | * */
|
40 | preventDuplicates: boolean;
|
41 | /**
|
42 | * Determines the how to treat duplicates.
|
43 | * */
|
44 | duplicatesBehaviour: NbDuplicateToastBehaviour;
|
45 | limit?: number;
|
46 | /**
|
47 | * Class to be applied to the toast.
|
48 | */
|
49 | toastClass: string;
|
50 | /**
|
51 | * Determines render icon or not.
|
52 | * */
|
53 | hasIcon: boolean;
|
54 | /**
|
55 | * Icon name or icon config object that can be provided to render custom icon.
|
56 | * */
|
57 | icon: string | NbIconConfig;
|
58 | /**
|
59 | * Toast status icon-class mapping.
|
60 | * */
|
61 | protected icons: IconToClassMap;
|
62 | constructor(config: Partial<NbToastrConfig>);
|
63 | protected patchIcon(config: Partial<NbToastrConfig>): void;
|
64 | }
|
65 | export {};
|