import { Component, Input } from "@angular/core";
import { LineMode } from "../line/line-mode";
var Mode = LineMode;
var HLineComponent = (function () {
    function HLineComponent() {
        this.height = "2px";
        this.color = "black";
        this.rawColor = false;
        this.padding = "0";
        this.nocolor = false;
        this.Mode = LineMode;
    }
    Object.defineProperty(HLineComponent.prototype, "mode", {
        get: function () {
            return this.nocolor !== false
                ? Mode.nocolor
                : this.rawColor == true || typeof this.rawColor === "string"
                    ? Mode.raw
                    : Mode.theme;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(HLineComponent.prototype, "_color", {
        get: function () {
            switch (this.mode) {
                case Mode.theme:
                    return this.color;
                case Mode.raw:
                    return this.rawColor == true
                        ? this.color
                        : this.rawColor;
                case Mode.nocolor:
                    return "";
            }
        },
        enumerable: true,
        configurable: true
    });
    HLineComponent.decorators = [
        { type: Component, args: [{
                    selector: "h-line",
                    styles: ["\n    h-line ion-navbar{min-height:0 !important}\n  "],
                    template: "\n    <div\n      *ngIf=\"mode===Mode.raw\"\n      [style.background]=\"_color\"\n      [style.height]=\"height\"\n      [style.padding]=\"padding\"\n      class=\"center-line\"\n    ></div>\n\n    <!-- TODO add android impl -->\n    <ion-toolbar\n      *ngIf=\"mode===Mode.theme\"\n      hideBackButton\n      [color]=\"_color\"\n      [style.padding]=\"padding\"\n      [style.height]=\"height\"\n      [style.maxHeight]=\"height\"\n      [style.minHeight]=\"height\"\n    ></ion-toolbar>\n\n    <div\n      *ngIf=\"mode===Mode.nocolor\"\n      [style.height]=\"height\"\n    ></div>\n  ",
                },] },
    ];
    /** @nocollapse */
    HLineComponent.ctorParameters = function () { return []; };
    HLineComponent.propDecorators = {
        "height": [{ type: Input },],
        "color": [{ type: Input },],
        "rawColor": [{ type: Input },],
        "padding": [{ type: Input },],
        "nocolor": [{ type: Input },],
    };
    return HLineComponent;
}());
export { HLineComponent };
//# sourceMappingURL=h-line.component.js.map