/**
 * This file is part of the MedSafe application which is commercial software created by MedVision360 B.V.
 * The source code is proprietary and confidential.
 *
 * Unauthorized copying of this file, via any medium is strictly prohibited.
 *
 * Copyright (c) by MedVision360 B.V. All rights reserved.
 *
 * For the application name: io.medrecord.medsafe
 */
import { __decorate } from "tslib";
import { Component, Input } from '@angular/core';
import { fontWeightStyle, linkColorStyle } from '../../models';
var ListComponent = /** @class */ (function () {
    function ListComponent() {
        this.numerable = false;
        this.linkOptions = {
            colorStyle: linkColorStyle.darkBlue,
            fontWeight: fontWeightStyle.bold,
            underline: false
        };
    }
    ListComponent.prototype.showContentAsLink = function (listItem) {
        return !listItem.template;
    };
    __decorate([
        Input()
    ], ListComponent.prototype, "items", void 0);
    __decorate([
        Input()
    ], ListComponent.prototype, "numerable", void 0);
    ListComponent = __decorate([
        Component({
            selector: 'app-list',
            template: "<ul>\n  <li *ngFor=\"let item of items; let i = index\">\n    <div *ngIf=\"numerable\" class=\"number\">{{i + 1}}.</div>\n    <div class=\"link\">\n      <app-link *ngIf=\"showContentAsLink(item)\" [options]=\"linkOptions\" [linkHref]=\"item.href\">{{ item.label }}</app-link>\n      <div *ngIf=\"!showContentAsLink(item)\">\n        <ng-container *ngTemplateOutlet=\"item.template;context:{data: item.templateData}\">></ng-container>\n      </div>\n    </div>\n  </li>\n</ul>\n",
            styles: ["/*!\n * This file is part of the MedSafe application which is commercial software created by MedVision360 B.V.\n *  The source code is proprietary and confidential.\n *\n *  Unauthorized copying of this file, via any medium is strictly prohibited.\n *\n *  Copyright (c) by MedVision360 B.V. All rights reserved.\n *\n *  For the application name: io.medrecord.medsafe\n */ul{padding:0;margin:0;list-style-type:none}li{display:flex;align-items:center}.link{padding:16px 0;display:block;flex-grow:1;border-bottom:1px solid var(--mystic-color)}.number{color:var(--hit-gray-color);width:32px}"]
        })
    ], ListComponent);
    return ListComponent;
}());
export { ListComponent };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlzdC5jb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