import * as i0 from '@angular/core';
import { Component, inject, Injectable } from '@angular/core';
import * as i1 from 'primeng/toast';
import { ToastModule } from 'primeng/toast';
import { MessageService } from 'primeng/api';

class Toast {
    toastPosition = 'bottom-right';
    toastTransX = 'translateX(100%)';
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Toast, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.3", type: Toast, isStandalone: true, selector: "mt-toast", ngImport: i0, template: "<p-toast [position]=\"toastPosition\" [showTransformOptions]=\"toastTransX\">\r\n  <!-- <ng-template let-message #headless let-closeFn=\"closeFn\"> -->\r\n  <!--   <div> -->\r\n  <!--     <div class=\"flex justify-between p-3\"> -->\r\n  <!--       <h6> -->\r\n  <!--         {{ message.summary }} -->\r\n  <!--       </h6> -->\r\n  <!--       <mt-button -->\r\n  <!--         size=\"small\" -->\r\n  <!--         icon=\"general.x\" -->\r\n  <!--         severity=\"secondary\" -->\r\n  <!--         text -->\r\n  <!--         (onClick)=\"closeFn()\" -->\r\n  <!--       /> -->\r\n  <!--     </div> -->\r\n  <!--   </div> -->\r\n  <!-- </ng-template> -->\r\n</p-toast>\r\n", dependencies: [{ kind: "ngmodule", type: ToastModule }, { kind: "component", type: i1.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "motionOptions", "breakpoints"], outputs: ["onClose"] }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Toast, decorators: [{
            type: Component,
            args: [{ standalone: true, imports: [ToastModule], selector: 'mt-toast', template: "<p-toast [position]=\"toastPosition\" [showTransformOptions]=\"toastTransX\">\r\n  <!-- <ng-template let-message #headless let-closeFn=\"closeFn\"> -->\r\n  <!--   <div> -->\r\n  <!--     <div class=\"flex justify-between p-3\"> -->\r\n  <!--       <h6> -->\r\n  <!--         {{ message.summary }} -->\r\n  <!--       </h6> -->\r\n  <!--       <mt-button -->\r\n  <!--         size=\"small\" -->\r\n  <!--         icon=\"general.x\" -->\r\n  <!--         severity=\"secondary\" -->\r\n  <!--         text -->\r\n  <!--         (onClick)=\"closeFn()\" -->\r\n  <!--       /> -->\r\n  <!--     </div> -->\r\n  <!--   </div> -->\r\n  <!-- </ng-template> -->\r\n</p-toast>\r\n" }]
        }] });

class ToastService {
    messageService = inject(MessageService);
    // translateService = inject(TranslateService);
    add(message) {
        this.messageService.add(message);
    }
    addAll(messages) {
        this.messageService.addAll(messages);
    }
    clear(key) {
        this.messageService.clear(key);
    }
    success(detail = '', 
    // summary: string = this.translateService.instant('success')
    summary = 'Success') {
        this.messageService.add({ severity: 'success', summary, detail });
    }
    warn(detail = '', 
    // summary: string = this.translateService.instant('error')
    summary = 'Warning') {
        this.messageService.add({ severity: 'warn', summary, detail });
    }
    error(detail = '', 
    // summary: string = this.translateService.instant('error')
    summary = 'Error') {
        this.messageService.add({ severity: 'error', summary, detail });
    }
    info(detail = '', 
    // summary: string = this.translateService.instant('info')
    summary = 'Info') {
        this.messageService.add({ severity: 'info', summary, detail });
    }
    secondary(detail = '', 
    // summary: string = this.translateService.instant('info')
    summary = '') {
        this.messageService.add({ severity: 'secondary', summary, detail });
    }
    contrast(detail = '', 
    // summary: string = this.translateService.instant('info')
    summary = '') {
        this.messageService.add({ severity: 'contrast', summary, detail });
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ToastService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ToastService, providedIn: 'root' });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ToastService, decorators: [{
            type: Injectable,
            args: [{
                    providedIn: 'root',
                }]
        }] });

/**
 * Generated bundle index. Do not edit.
 */

export { Toast, ToastService };
//# sourceMappingURL=masterteam-components-toast.mjs.map
