import { Component } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "../../services/smz-dock.service";
import * as i2 from "@angular/common";
import * as i3 from "primeng/dock";
import * as i4 from "primeng/api";
export class SmzDockComponent {
    constructor(dockService) {
        this.dockService = dockService;
    }
    ngOnInit() { }
    execute(item) {
        switch (item.type) {
            case 'dialog':
                item.component.restore();
                this.dockService.remove(item.id);
                break;
            default:
                break;
        }
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: SmzDockComponent, deps: [{ token: i1.SmzDockService }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: SmzDockComponent, selector: "smz-ui-dock", ngImport: i0, template: "<ng-container *ngIf=\"dockService.dockItems != null\">\r\n  <p-dock [model]=\"dockService.dockItems\" position=\"bottom\" [ngClass]=\"{ 'hidden': dockService.dockItems.length === 0}\">\r\n    <ng-template pTemplate=\"item\" let-item>\r\n        <div class=\"w-full relative cursor-pointer\" (click)=\"execute(item)\">\r\n          <img [src]=\"item.icon\" width=\"100%\">\r\n          <div *ngIf=\"item.label != null\" class=\"absolute inset-0 grid grid-nogutter items-center justify-center flex-col\">\r\n            <div class=\"text-center font-medium my-auto pt-2 select-none text-black text-xs\">{{ item.label }}</div>\r\n          </div>\r\n        </div>\r\n    </ng-template>\r\n  </p-dock>\r\n</ng-container>", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.Dock, selector: "p-dock", inputs: ["id", "style", "styleClass", "model", "position", "ariaLabel", "ariaLabelledBy"], outputs: ["onFocus", "onBlur"] }, { kind: "directive", type: i4.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: SmzDockComponent, decorators: [{
            type: Component,
            args: [{ selector: 'smz-ui-dock', template: "<ng-container *ngIf=\"dockService.dockItems != null\">\r\n  <p-dock [model]=\"dockService.dockItems\" position=\"bottom\" [ngClass]=\"{ 'hidden': dockService.dockItems.length === 0}\">\r\n    <ng-template pTemplate=\"item\" let-item>\r\n        <div class=\"w-full relative cursor-pointer\" (click)=\"execute(item)\">\r\n          <img [src]=\"item.icon\" width=\"100%\">\r\n          <div *ngIf=\"item.label != null\" class=\"absolute inset-0 grid grid-nogutter items-center justify-center flex-col\">\r\n            <div class=\"text-center font-medium my-auto pt-2 select-none text-black text-xs\">{{ item.label }}</div>\r\n          </div>\r\n        </div>\r\n    </ng-template>\r\n  </p-dock>\r\n</ng-container>" }]
        }], ctorParameters: () => [{ type: i1.SmzDockService }] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic216LWRvY2suY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXNtei11aS9zcmMvbGliL21vZHVsZXMvc216LWRvY2svZmVhdHVyZXMvZG9jay9zbXotZG9jay5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtc216LXVpL3NyYy9saWIvbW9kdWxlcy9zbXotZG9jay9mZWF0dXJlcy9kb2NrL3Ntei1kb2NrLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQVUsTUFBTSxlQUFlLENBQUM7Ozs7OztBQVFsRCxNQUFNLE9BQU8sZ0JBQWdCO0lBQzNCLFlBQW1CLFdBQTJCO1FBQTNCLGdCQUFXLEdBQVgsV0FBVyxDQUFnQjtJQUFJLENBQUM7SU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