// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to
//  deal in the Software without restriction, including without limitation the
//  rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
//  sell copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
import { Component, ElementRef, HostBinding, Input, } from "@angular/core";
import { ResizeDirection } from "../../../common/directives/resizer/public-api";
// <example-url>./../examples/index.html#/layout</example-url>
export class SheetComponent {
    constructor(elRef) {
        this.elRef = elRef;
        this.direction = "row";
        this.directionColumn = false;
        this.directionRow = true;
    }
    ngOnInit() {
        this.directionColumn =
            (this.directionColumn && !this.directionRow) ||
                this.direction === "column";
        this.directionRow =
            (!this.directionColumn && this.directionRow) ||
                this.direction === "row";
        this.resizeDirection =
            this.direction === "row"
                ? ResizeDirection.right
                : ResizeDirection.bottom;
    }
}
SheetComponent.decorators = [
    { type: Component, args: [{
                selector: "nui-sheet",
                template: "<ng-content></ng-content>\n",
                host: { class: "nui-sheet" },
                styles: [":host{position:relative;display:flex;overflow:auto;width:100%;height:100%;min-height:50px;box-shadow:0 0 5px 0 var(--nui-shadow-color, rgba(17, 17, 17, .3));flex-grow:1;min-width:min-content;background-color:var(--nui-color-bg-light,#fff)}:host.sheet-fit-content{width:auto;height:auto;flex-shrink:0}:host.sheet-direction-column{flex-direction:column}:host.sheet-direction-row{flex-direction:row}:host-context(.nui-sheet-group--joined-sheets.sheet-group-direction-row >):not(:last-of-type):not(:first-of-type){border-right-color:var(--nui-color-line-dark,#999999);border-right-width:var(--nui-line-default,1px);border-right-style:solid;border-left-color:var(--nui-color-line-default,#d9d9d9);border-left-width:var(--nui-line-default,1px);border-left-style:solid}:host-context(.nui-sheet-group--joined-sheets.sheet-group-direction-row >):last-of-type{border-left-color:var(--nui-color-line-default,#d9d9d9);border-left-width:var(--nui-line-default,1px);border-left-style:solid}:host-context(.nui-sheet-group--joined-sheets.sheet-group-direction-row >):first-of-type{border-right-color:var(--nui-color-line-dark,#999999);border-right-width:var(--nui-line-default,1px);border-right-style:solid}:host-context(.nui-sheet-group--joined-sheets.sheet-group-direction-row >):only-child{border:none}:host-context(.nui-sheet-group--joined-sheets.sheet-group-direction-column >):not(:last-of-type):not(:first-of-type){border-bottom-color:var(--nui-color-line-dark,#999999);border-bottom-width:var(--nui-line-default,1px);border-bottom-style:solid;border-top-color:var(--nui-color-line-default,#d9d9d9);border-top-width:var(--nui-line-default,1px);border-top-style:solid}:host-context(.nui-sheet-group--joined-sheets.sheet-group-direction-column >):last-of-type{border-top-color:var(--nui-color-line-default,#d9d9d9);border-top-width:var(--nui-line-default,1px);border-top-style:solid}:host-context(.nui-sheet-group--joined-sheets.sheet-group-direction-column >):first-of-type{border-bottom-color:var(--nui-color-line-dark,#999999);border-bottom-width:var(--nui-line-default,1px);border-bottom-style:solid}:host-context(.nui-sheet-group--joined-sheets.sheet-group-direction-column >):only-child{border:none}:host-context(.nui-sheet-group--separate-sheets.sheet-group-direction-row >):not(:last-of-type){margin-right:15px}:host-context(.nui-sheet-group--separate-sheets.sheet-group-direction-column >):not(:last-of-type){margin-bottom:15px}:host-context(.nui-sheet-group--resizable) nui-sheet{width:auto;height:auto}:host-context(.nui-sheet-group--joined-sheets){box-shadow:none}\n"]
            },] }
];
SheetComponent.ctorParameters = () => [
    { type: ElementRef }
];
SheetComponent.propDecorators = {
    fitContent: [{ type: HostBinding, args: ["class.sheet-fit-content",] }, { type: Input }],
    direction: [{ type: Input }],
    initialSizeValue: [{ type: Input }],
    directionColumn: [{ type: HostBinding, args: ["class.sheet-direction-column",] }],
    directionRow: [{ type: HostBinding, args: ["class.sheet-direction-row",] }]
};
//# sourceMappingURL=data:application/json;base64, 