import { Button } from '@masterteam/components/button';
import * as i0 from '@angular/core';
import { model, output, input, Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import * as i1 from 'primeng/drawer';
import { DrawerModule } from 'primeng/drawer';

class Drawer {
    visible = model(false, ...(ngDevMode ? [{ debugName: "visible" }] : []));
    visibleChange = output();
    onShow = output();
    onHide = output();
    position = input('right', ...(ngDevMode ? [{ debugName: "position" }] : []));
    fullScreen = input(false, ...(ngDevMode ? [{ debugName: "fullScreen" }] : []));
    closeOnEscape = input(false, ...(ngDevMode ? [{ debugName: "closeOnEscape" }] : []));
    blockScroll = input(true, ...(ngDevMode ? [{ debugName: "blockScroll" }] : []));
    dismissible = input(true, ...(ngDevMode ? [{ debugName: "dismissible" }] : []));
    title = input('', ...(ngDevMode ? [{ debugName: "title" }] : []));
    styleClass = input('', ...(ngDevMode ? [{ debugName: "styleClass" }] : []));
    transitionOptions = input('200ms cubic-bezier(0, 0, 1, 1)', ...(ngDevMode ? [{ debugName: "transitionOptions" }] : []));
    appendTo = input('body', ...(ngDevMode ? [{ debugName: "appendTo" }] : []));
    modal = input(true, ...(ngDevMode ? [{ debugName: "modal" }] : []));
    visibleChangeEvent(event) {
        this.visibleChange.emit(event);
    }
    onClose() {
        this.visible.set(false);
        this.visibleChange.emit(false);
        this.onHide.emit(true);
    }
    onShowEvent() {
        this.onShow.emit(true);
    }
    onHideEvent() {
        this.onHide.emit(true);
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Drawer, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.3", type: Drawer, isStandalone: true, selector: "mt-drawer", inputs: { visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, fullScreen: { classPropertyName: "fullScreen", publicName: "fullScreen", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, blockScroll: { classPropertyName: "blockScroll", publicName: "blockScroll", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, transitionOptions: { classPropertyName: "transitionOptions", publicName: "transitionOptions", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, modal: { classPropertyName: "modal", publicName: "modal", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange", visibleChange: "visibleChange", onShow: "onShow", onHide: "onHide" }, ngImport: i0, template: "<p-drawer\n  [(visible)]=\"visible\"\n  [position]=\"position()\"\n  [fullScreen]=\"fullScreen()\"\n  [modal]=\"modal()\"\n  [closable]=\"false\"\n  [closeOnEscape]=\"closeOnEscape()\"\n  [blockScroll]=\"blockScroll()\"\n  [dismissible]=\"dismissible()\"\n  [appendTo]=\"appendTo()\"\n  [transitionOptions]=\"transitionOptions()\"\n  [styleClass]=\"styleClass() + ' mt-custom-drawer'\"\n  (visibleChange)=\"visibleChangeEvent($event)\"\n  (onShow)=\"onShowEvent()\"\n  (onHide)=\"onHideEvent()\"\n>\n  <ng-template #header>\n    <div\n      class=\"flex items-center justify-between px-5 w-full py-3 border-b border-surface\"\n    >\n      <h3 class=\"text-xl font-semibold\">{{ title() }}</h3>\n      <mt-button\n        (onClick)=\"onClose()\"\n        variant=\"outlined\"\n        styleClass=\"!bg-white\"\n        icon=\"general.x-close\"\n        severity=\"secondary\"\n      >\n      </mt-button>\n    </div>\n  </ng-template>\n\n  <ng-content select=\"[content]\"></ng-content>\n\n  <ng-template #footer>\n    <div class=\"flex justify-end p-3 gap-2 border-t border-surface-200\">\n      <ng-content select=\"[footer]\"></ng-content>\n    </div>\n  </ng-template>\n</p-drawer>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: DrawerModule }, { kind: "component", type: i1.Drawer, selector: "p-drawer", inputs: ["appendTo", "motionOptions", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "closeButtonProps", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen", "header", "maskStyle", "closable"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Drawer, decorators: [{
            type: Component,
            args: [{ selector: 'mt-drawer', standalone: true, imports: [CommonModule, DrawerModule, Button], template: "<p-drawer\n  [(visible)]=\"visible\"\n  [position]=\"position()\"\n  [fullScreen]=\"fullScreen()\"\n  [modal]=\"modal()\"\n  [closable]=\"false\"\n  [closeOnEscape]=\"closeOnEscape()\"\n  [blockScroll]=\"blockScroll()\"\n  [dismissible]=\"dismissible()\"\n  [appendTo]=\"appendTo()\"\n  [transitionOptions]=\"transitionOptions()\"\n  [styleClass]=\"styleClass() + ' mt-custom-drawer'\"\n  (visibleChange)=\"visibleChangeEvent($event)\"\n  (onShow)=\"onShowEvent()\"\n  (onHide)=\"onHideEvent()\"\n>\n  <ng-template #header>\n    <div\n      class=\"flex items-center justify-between px-5 w-full py-3 border-b border-surface\"\n    >\n      <h3 class=\"text-xl font-semibold\">{{ title() }}</h3>\n      <mt-button\n        (onClick)=\"onClose()\"\n        variant=\"outlined\"\n        styleClass=\"!bg-white\"\n        icon=\"general.x-close\"\n        severity=\"secondary\"\n      >\n      </mt-button>\n    </div>\n  </ng-template>\n\n  <ng-content select=\"[content]\"></ng-content>\n\n  <ng-template #footer>\n    <div class=\"flex justify-end p-3 gap-2 border-t border-surface-200\">\n      <ng-content select=\"[footer]\"></ng-content>\n    </div>\n  </ng-template>\n</p-drawer>\n" }]
        }], propDecorators: { visible: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }, { type: i0.Output, args: ["visibleChange"] }], visibleChange: [{ type: i0.Output, args: ["visibleChange"] }], onShow: [{ type: i0.Output, args: ["onShow"] }], onHide: [{ type: i0.Output, args: ["onHide"] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], fullScreen: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullScreen", required: false }] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], blockScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "blockScroll", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], transitionOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "transitionOptions", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], modal: [{ type: i0.Input, args: [{ isSignal: true, alias: "modal", required: false }] }] } });

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

export { Drawer };
//# sourceMappingURL=masterteam-components-drawer.mjs.map
