import { Component } from "@angular/core";
import * as i0 from "@angular/core";
import * as i1 from "../services/sti-toolbar-resizer.service";
import * as i2 from "@angular/common";
import * as i3 from "./sti-tooltip/sti-tooltip.directive";
export class StiToolbarResizerComponent {
    constructor(toolbarResizerService) {
        this.toolbarResizerService = toolbarResizerService;
    }
    get isMaximize() {
        return this.toolbarResizerService.isMaximizeMode;
    }
    get isMinimize() {
        return this.toolbarResizerService.isMinimizeMode;
    }
    setMinimizeMode() {
        this.toolbarResizerService.isMinimizeMode = true;
        this.toolbarResizerService.isMaximizeMode = false;
        if (document.querySelector(".maximize")) {
            document.querySelector(".maximize")?.classList?.remove("maxMode");
        }
        document.querySelector(".minimize")?.classList?.add("minMode");
    }
    setMaximizeMode() {
        this.toolbarResizerService.isMinimizeMode = false;
        this.toolbarResizerService.isMaximizeMode = true;
        if (document.querySelector(".minimize")) {
            document.querySelector(".minimize")?.classList?.remove("minMode");
        }
        document.querySelector(".maximize")?.classList?.add("maxMode");
    }
    ngOnInit() { }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StiToolbarResizerComponent, deps: [{ token: i1.StiToolbarResizerService }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: StiToolbarResizerComponent, selector: "sti-toolbar-resizer", ngImport: i0, template: `
    <div class="toolbarResizer">
      <div
        class="resizer minimize"
        *ngIf="this.isMaximize"
        (mousedown)="setMinimizeMode()"
        stiTooltip="Minimize"
        tooltipPosition="bottom"
        showDelay="500"
      >
        <div class="point"></div>
      </div>
      <div
        class="resizer maximize"
        *ngIf="this.isMinimize"
        (mousedown)="setMaximizeMode()"
        stiTooltip="Maximize"
        tooltipPosition="bottom"
        showDelay="500"
      >
        <div class="point"></div>
      </div>
    </div>
    <style>
      .toolbarResizer {
      }
      .resizer {
        width: 8px;
        height: 30px;
        background-color: var(--toolbarResizer-color);
        border: 1px solid var(--toolbarResizerBorder-color);
        position: fixed;
        top: calc((100% - 85px - 24px) / 2 + 85px - 15px);
      }
      .minimize {
        border-bottom-left-radius: 3px;
        border-top-left-radius: 3px;
        left: 192px;
      }
      .minimize:hover {
        background-color: var(--hover-color);
      }
      .point {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 1px;
        height: 2px;
        background-color: rgb(119, 119, 119);
      }
      .maximize {
        border-top-right-radius: 3px;
        border-bottom-right-radius: 3px;
        left: 45px;
        margin-right: 10px;
      }
      .maximize:hover {
        background-color: var(--hover-color);
      }
      .maxMode {
        left: 192px;
      }
      .minMode {
        left: 45px;
      }
    </style>
  `, isInline: true, styles: ["\n      .toolbarResizer {\n      }\n      .resizer {\n        width: 8px;\n        height: 30px;\n        background-color: var(--toolbarResizer-color);\n        border: 1px solid var(--toolbarResizerBorder-color);\n        position: fixed;\n        top: calc((100% - 85px - 24px) / 2 + 85px - 15px);\n      }\n      .minimize {\n        border-bottom-left-radius: 3px;\n        border-top-left-radius: 3px;\n        left: 192px;\n      }\n      .minimize:hover {\n        background-color: var(--hover-color);\n      }\n      .point {\n        position: absolute;\n        top: 50%;\n        left: 50%;\n        width: 1px;\n        height: 2px;\n        background-color: rgb(119, 119, 119);\n      }\n      .maximize {\n        border-top-right-radius: 3px;\n        border-bottom-right-radius: 3px;\n        left: 45px;\n        margin-right: 10px;\n      }\n      .maximize:hover {\n        background-color: var(--hover-color);\n      }\n      .maxMode {\n        left: 192px;\n      }\n      .minMode {\n        left: 45px;\n      }\n    "], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.StiTooltipDirective, selector: "[stiTooltip]", inputs: ["tooltipPosition", "stiTooltip", "showDelay"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: StiToolbarResizerComponent, decorators: [{
            type: Component,
            args: [{
                    selector: "sti-toolbar-resizer",
                    template: `
    <div class="toolbarResizer">
      <div
        class="resizer minimize"
        *ngIf="this.isMaximize"
        (mousedown)="setMinimizeMode()"
        stiTooltip="Minimize"
        tooltipPosition="bottom"
        showDelay="500"
      >
        <div class="point"></div>
      </div>
      <div
        class="resizer maximize"
        *ngIf="this.isMinimize"
        (mousedown)="setMaximizeMode()"
        stiTooltip="Maximize"
        tooltipPosition="bottom"
        showDelay="500"
      >
        <div class="point"></div>
      </div>
    </div>
    <style>
      .toolbarResizer {
      }
      .resizer {
        width: 8px;
        height: 30px;
        background-color: var(--toolbarResizer-color);
        border: 1px solid var(--toolbarResizerBorder-color);
        position: fixed;
        top: calc((100% - 85px - 24px) / 2 + 85px - 15px);
      }
      .minimize {
        border-bottom-left-radius: 3px;
        border-top-left-radius: 3px;
        left: 192px;
      }
      .minimize:hover {
        background-color: var(--hover-color);
      }
      .point {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 1px;
        height: 2px;
        background-color: rgb(119, 119, 119);
      }
      .maximize {
        border-top-right-radius: 3px;
        border-bottom-right-radius: 3px;
        left: 45px;
        margin-right: 10px;
      }
      .maximize:hover {
        background-color: var(--hover-color);
      }
      .maxMode {
        left: 192px;
      }
      .minMode {
        left: 45px;
      }
    </style>
  `,
                }]
        }], ctorParameters: () => [{ type: i1.StiToolbarResizerService }] });
//# sourceMappingURL=data:application/json;base64, 