import { ChangeDetectionStrategy, Component, Input, } from '@angular/core';
import { WindowRef } from '../../window-ref';
import { StopPropagationDirective } from '@rxap/directives';
import { MatButtonModule } from '@angular/material/button';
import { IconDirective } from '@rxap/material-directives/icon';
import { MatIconModule } from '@angular/material/icon';
import { AsyncPipe, NgClass, NgIf, } from '@angular/common';
import * as i0 from "@angular/core";
import * as i1 from "@angular/material/icon";
import * as i2 from "@angular/material/button";
export class WindowTaskComponent {
    close() {
        this.window.complete();
    }
    reopen() {
        this.window.reopen();
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: WindowTaskComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: WindowTaskComponent, isStandalone: true, selector: "rxap-window-task", inputs: { window: "window" }, ngImport: i0, template: "<div (click)=\"reopen()\" [ngClass]=\"{ minimized: window.isMinimized }\"\n     class=\"rxap-container mat-elevation-z2 flex flex-row justify-start items-center gap-2\">\n  <ng-template [ngIf]=\"window.settings$ | async\" let-settings>\n    <mat-icon *ngIf=\"settings.icon\" [rxapIcon]=\"settings.icon\"></mat-icon>\n    <h3 *ngIf=\"settings.title\" class=\"grow\">{{settings.title}}</h3>\n  </ng-template>\n  <button (click)=\"close()\" mat-icon-button rxapStopPropagation type=\"button\">\n    <mat-icon>close</mat-icon>\n  </button>\n</div>\n", styles: [".rxap-container{padding:5px;cursor:pointer}.rxap-container.minimized{opacity:.5}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: IconDirective, selector: "mat-icon[rxapIcon]", inputs: ["rxapIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: StopPropagationDirective, selector: "[rxapStopPropagation]" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: WindowTaskComponent, decorators: [{
            type: Component,
            args: [{ selector: 'rxap-window-task', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
                        NgClass,
                        NgIf,
                        MatIconModule,
                        IconDirective,
                        MatButtonModule,
                        StopPropagationDirective,
                        AsyncPipe,
                    ], template: "<div (click)=\"reopen()\" [ngClass]=\"{ minimized: window.isMinimized }\"\n     class=\"rxap-container mat-elevation-z2 flex flex-row justify-start items-center gap-2\">\n  <ng-template [ngIf]=\"window.settings$ | async\" let-settings>\n    <mat-icon *ngIf=\"settings.icon\" [rxapIcon]=\"settings.icon\"></mat-icon>\n    <h3 *ngIf=\"settings.title\" class=\"grow\">{{settings.title}}</h3>\n  </ng-template>\n  <button (click)=\"close()\" mat-icon-button rxapStopPropagation type=\"button\">\n    <mat-icon>close</mat-icon>\n  </button>\n</div>\n", styles: [".rxap-container{padding:5px;cursor:pointer}.rxap-container.minimized{opacity:.5}\n"] }]
        }], propDecorators: { window: [{
                type: Input,
                args: [{ required: true }]
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2luZG93LXRhc2suY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvYW5ndWxhci93aW5kb3ctc3lzdGVtL3NyYy9saWIvd2luZG93LXRhc2stYmFyL3dpbmRvdy10YXNrL3dpbmRvdy10YXNrLmNvbXBvbmVud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