import { Location } from '@angular/common'; import { OnInit } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { ApiResponseError } from '@dasch-swiss/dsp-js'; import { StatusMsg } from '../../../../assets/i18n/statusMsg'; /** * @ignore * Data type for messages */ export declare class DspMessageData { status: number; statusMsg?: string; statusText?: string; type?: string; route?: string; footnote?: string; errorInfo?: string; url?: string; } /** * @deprecated Will be replaced by notification service with material snackbar */ export declare class MessageComponent implements OnInit { private _router; private _location; private _activatedRoute; private _status; /** * Message type: DspMessageData * * @param message This type needs at least a status number (0-599). * In this case, or if type is ApiResponseError, it takes the default status messages * from the list of HTTP status codes (https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) */ message: DspMessageData; /** * Message type: ApiResponseError * @param apiError */ apiError?: ApiResponseError; /** * Size of the message: long, medium or short? * @param size Default size is 'long' */ size: 'short' | 'medium' | 'long'; /** * @deprecated * @param short Show short message only * A small message box to notify the user an event has occured. */ short: boolean; /** * @deprecated * @param medium Show medium message * A message box without footnote or links. */ medium: boolean; /** * @param duration How long should the message be displayed */ duration?: number; statusMsg: any; isLoading: boolean; showLinks: boolean; disable: boolean; /** * @ignore * default link list, which will be used in message content to give a user some possibilities * what he can do in the case of an error * */ links: any; constructor(_router: Router, _location: Location, _activatedRoute: ActivatedRoute, _status: StatusMsg); ngOnInit(): void; setMessage(msg: DspMessageData): DspMessageData; goToLocation(route: string): void; closeMessage(): void; reload(): void; }