import { Component, Input } from "@angular/core";
import { StiVerticalAlignment } from "../../system/enums";
import * as i0 from "@angular/core";
import * as i1 from "../../services/model.service";
import * as i2 from "@angular/common";
import * as i3 from "../sti-component";
import * as i4 from "../sti-editable-content.component";
export class StiLineComponent {
    constructor(model) {
        this.model = model;
        this.isClone = false;
    }
    get verticalAlignment() {
        if (this.element.verticalAlignment == StiVerticalAlignment.Top) {
            return "start";
        }
        else if (this.element.verticalAlignment == StiVerticalAlignment.Bottom) {
            return "flex-end";
        }
        else {
            return "center";
        }
    }
    ngOnInit() { }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: StiLineComponent, deps: [{ token: i1.StiModelService }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: StiLineComponent, selector: "sti-line-component", inputs: { element: "element", isClone: "isClone" }, ngImport: i0, template: ` <sti-component [element]="element" [isClone]="isClone" class="sti-line">
    <div class="line-container" [style.align-items]="verticalAlignment">
      <div class="line" [style.border-bottom]="element.toHtmlBorder()"></div>
    </div>
    <sti-editable-content-component
      *ngIf="element?.description.value?.length > 0"
      [editableContent]="element.description"
    >
    </sti-editable-content-component>
  </sti-component>`, isInline: true, styles: [".line-container{height:100%;width:100%;display:flex}.line{width:100%;margin:0;font-size:1px;height:1px;border-bottom:1px solid transparent}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.StiComponent, selector: "sti-component", inputs: ["element", "class", "isClone", "borderArea"] }, { kind: "component", type: i4.StiEditableContentComponent, selector: "sti-editable-content-component", inputs: ["editableContent", "displayContent", "required", "eParent", "hideEmpty", "active", "alignment", "isTableTotalHeader", "disablePadding", "fromButton", "parentCursor", "isTableHeader"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: StiLineComponent, decorators: [{
            type: Component,
            args: [{ selector: "sti-line-component", template: ` <sti-component [element]="element" [isClone]="isClone" class="sti-line">
    <div class="line-container" [style.align-items]="verticalAlignment">
      <div class="line" [style.border-bottom]="element.toHtmlBorder()"></div>
    </div>
    <sti-editable-content-component
      *ngIf="element?.description.value?.length > 0"
      [editableContent]="element.description"
    >
    </sti-editable-content-component>
  </sti-component>`, styles: [".line-container{height:100%;width:100%;display:flex}.line{width:100%;margin:0;font-size:1px;height:1px;border-bottom:1px solid transparent}\n"] }]
        }], ctorParameters: function () { return [{ type: i1.StiModelService }]; }, propDecorators: { element: [{
                type: Input
            }], isClone: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RpLWxpbmUuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvc3RpbXVsc29mdC1mb3Jtcy9zcmMvbGliL2NvbXBvbmVudHMvc3RpLWxpbmUvc3RpLWxpbmUuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFVLE1BQU0sZUFBZSxDQUFDO0FBSXpELE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLG9CQUFvQixDQUFDOzs7Ozs7QUErQjFELE1BQU0sT0FBTyxnQkFBZ0I7SUFHM0IsWUFBb0IsS0FBc0I7UUFBdEIsVUFBSyxHQUFMLEtBQUssQ0FBaUI7UUFEakMsWUFBTyxHQUFZLEtBQUssQ0FBQztJQUNXLENBQUM7SUFDOUMsSUFBVyxpQkFBaUI7UUFDMUIsSUFBSSxJQUFJLENBQUMsT0FBTyxDQUFDLGlCQUFpQixJQUFJLG9CQUFvQixDQUFDLEdBQUcsRUFBRTtZQUM5RCxPQUFPLE9BQU8sQ0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