import { ChangeDetectionStrategy, Component, Inject, } from '@angular/core';
import { RXAP_WINDOW_CONTEXT } from '../tokens';
import { MatButtonModule } from '@angular/material/button';
import { IconDirective } from '@rxap/material-directives/icon';
import { MatIconModule } from '@angular/material/icon';
import { PortalModule } from '@angular/cdk/portal';
import { AsyncPipe, NgIf, } from '@angular/common';
import { MatToolbarModule } from '@angular/material/toolbar';
import * as i0 from "@angular/core";
import * as i1 from "@angular/material/toolbar";
import * as i2 from "@angular/cdk/portal";
import * as i3 from "@angular/material/icon";
import * as i4 from "@angular/material/button";
export class WindowToolBarComponent {
    constructor(context) {
        this.windowRef = context.windowRef;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: WindowToolBarComponent, deps: [{ token: RXAP_WINDOW_CONTEXT }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: WindowToolBarComponent, isStandalone: true, selector: "rxap-window-tool-bar", ngImport: i0, template: "<mat-toolbar class=\"header flex flex-row items-center justify-between gap-x-4\">\n  <div class=\"flex flex-row justify-end items-center gap-x-3\">\n    <ng-template [ngIfElse]=\"titleFromSettings\" [ngIf]=\"windowRef.titlePortal$ | async\" let-titlePortal>\n      <ng-template [cdkPortalOutlet]=\"titlePortal\"></ng-template>\n    </ng-template>\n    <ng-template #titleFromSettings>\n      <ng-template [ngIf]=\"windowRef.settings$ | async\" let-settings>\n        <mat-icon *ngIf=\"settings.icon\" [rxapIcon]=\"settings.icon\"></mat-icon>\n        <h3 *ngIf=\"settings.title\">{{settings.title}}</h3>\n      </ng-template>\n    </ng-template>\n  </div>\n  <div class=\"flex flex-row justify-end items-center\">\n    <button (click)=\"windowRef.minimize()\" *ngIf=\"windowRef.minimizable !== false\"\n            mat-icon-button type=\"button\">\n      <mat-icon>minimize</mat-icon>\n    </button>\n    <button (click)=\"windowRef.fullScreen()\" mat-icon-button type=\"button\">\n      <mat-icon>fullscreen</mat-icon>\n    </button>\n    <button (click)=\"windowRef.complete()\" mat-icon-button type=\"button\">\n      <mat-icon>close</mat-icon>\n    </button>\n  </div>\n</mat-toolbar>\n", styles: [":host{width:100%}.header{height:64px}\n"], dependencies: [{ kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i1.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i2.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.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: i4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.Default }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: WindowToolBarComponent, decorators: [{
            type: Component,
            args: [{ selector: 'rxap-window-tool-bar', changeDetection: ChangeDetectionStrategy.Default, standalone: true, imports: [
                        MatToolbarModule,
                        NgIf,
                        PortalModule,
                        MatIconModule,
                        IconDirective,
                        MatButtonModule,
                        AsyncPipe,
                    ], template: "<mat-toolbar class=\"header flex flex-row items-center justify-between gap-x-4\">\n  <div class=\"flex flex-row justify-end items-center gap-x-3\">\n    <ng-template [ngIfElse]=\"titleFromSettings\" [ngIf]=\"windowRef.titlePortal$ | async\" let-titlePortal>\n      <ng-template [cdkPortalOutlet]=\"titlePortal\"></ng-template>\n    </ng-template>\n    <ng-template #titleFromSettings>\n      <ng-template [ngIf]=\"windowRef.settings$ | async\" let-settings>\n        <mat-icon *ngIf=\"settings.icon\" [rxapIcon]=\"settings.icon\"></mat-icon>\n        <h3 *ngIf=\"settings.title\">{{settings.title}}</h3>\n      </ng-template>\n    </ng-template>\n  </div>\n  <div class=\"flex flex-row justify-end items-center\">\n    <button (click)=\"windowRef.minimize()\" *ngIf=\"windowRef.minimizable !== false\"\n            mat-icon-button type=\"button\">\n      <mat-icon>minimize</mat-icon>\n    </button>\n    <button (click)=\"windowRef.fullScreen()\" mat-icon-button type=\"button\">\n      <mat-icon>fullscreen</mat-icon>\n    </button>\n    <button (click)=\"windowRef.complete()\" mat-icon-button type=\"button\">\n      <mat-icon>close</mat-icon>\n    </button>\n  </div>\n</mat-toolbar>\n", styles: [":host{width:100%}.header{height:64px}\n"] }]
        }], ctorParameters: () => [{ type: undefined, decorators: [{
                    type: Inject,
                    args: [RXAP_WINDOW_CONTEXT]
                }] }] });
//# sourceMappingURL=data:application/json;base64, 