import { ChangeDetectionStrategy, Component, ContentChildren, Directive, ElementRef, HostListener, Input, Renderer2, ViewEncapsulation } from "@angular/core";
import { coerceBooleanProperty } from '@angular/cdk/coercion';
import { setLines } from '@angular/material/core';
export class QMSListLeadingIcon {
}
QMSListLeadingIcon.decorators = [
    { type: Directive, args: [{
                selector: '[leading-icon]',
                host: { 'class': 'leading-icon' }
            },] }
];
export class QMSListLine {
    constructor(elRef, renderer) {
        this.elRef = elRef;
        this.renderer = renderer;
    }
    ngOnInit() {
        if (this.type === 'caption') {
            this.renderer.setAttribute(this.elRef.nativeElement, 'class', 'caption');
        }
        else if (this.type === 'subtitle') {
            this.renderer.setAttribute(this.elRef.nativeElement, 'class', `subtitle size-${this.size ? this.size : 'none'}`);
        }
        else {
            this.renderer.setAttribute(this.elRef.nativeElement, 'class', `qms-line size-${this.size ? this.size : 'none'}`);
        }
        if (this.color) {
            this.renderer.addClass(this.elRef.nativeElement, this.color);
        }
    }
}
QMSListLine.decorators = [
    { type: Directive, args: [{
                selector: '[qms-line]'
            },] }
];
QMSListLine.ctorParameters = () => [
    { type: ElementRef },
    { type: Renderer2 }
];
QMSListLine.propDecorators = {
    size: [{ type: Input, args: ['size',] }],
    type: [{ type: Input, args: ['type',] }],
    color: [{ type: Input, args: ['color',] }]
};
export class QMSListHeader {
}
QMSListHeader.decorators = [
    { type: Directive, args: [{
                selector: '[qms-list-header]',
                host: { 'class': 'qms-list-header' }
            },] }
];
export class QMSListExpansion {
    constructor(elRef, renderer) {
        this.elRef = elRef;
        this.renderer = renderer;
    }
    ngAfterContentInit() {
        // setLines(this._lines, this.elRef);
    }
}
QMSListExpansion.decorators = [
    { type: Directive, args: [{
                selector: '[qms-expansion]',
                host: { 'class': 'qms-expansion' }
            },] }
];
QMSListExpansion.ctorParameters = () => [
    { type: ElementRef },
    { type: Renderer2 }
];
QMSListExpansion.propDecorators = {
    _lines: [{ type: ContentChildren, args: [QMSListLine, { descendants: true },] }]
};
export class QMSListExpansionHeader {
    constructor(elRef, renderer) {
        this.elRef = elRef;
        this.renderer = renderer;
    }
    onClick($event) {
        const qmsList = document.querySelectorAll('.qms-expansion-header');
        [].forEach.call(qmsList, (el) => {
            el.classList.remove('active-item');
        });
        this.renderer.addClass(this.elRef.nativeElement, 'active-item');
    }
    ngAfterContentInit() {
        setLines(this._lines, this.elRef);
    }
}
QMSListExpansionHeader.decorators = [
    { type: Directive, args: [{
                selector: '[qms-expansion-header]',
                host: { 'class': 'qms-expansion-header' }
            },] }
];
QMSListExpansionHeader.ctorParameters = () => [
    { type: ElementRef },
    { type: Renderer2 }
];
QMSListExpansionHeader.propDecorators = {
    _lines: [{ type: ContentChildren, args: [QMSListLine, { descendants: true },] }],
    onClick: [{ type: HostListener, args: ['click', ['$event'],] }]
};
export class QMSList {
    constructor(elRef) {
        this.elRef = elRef;
    }
    ngOnInit() { }
}
QMSList.decorators = [
    { type: Component, args: [{
                selector: 'qms-list',
                template: "<ng-content></ng-content>\r\n",
                host: { 'class': 'qms-list' },
                encapsulation: ViewEncapsulation.None,
                changeDetection: ChangeDetectionStrategy.OnPush,
                styles: [".mat-expansion-panel.qms-expansion{background-color:transparent;box-shadow:none;border-bottom:1px solid #e0e0e0;margin:0 1rem;border-radius:0;font-family:Open Sans}.mat-expansion-panel.qms-expansion .mat-expansion-panel-header{height:40px;padding:0 10px;font-family:inherit}.mat-expansion-panel.qms-expansion .mat-expansion-panel-header.mat-2-line{height:63px}.mat-expansion-panel.qms-expansion .mat-expansion-panel-header.mat-3-line{height:81px}.mat-expansion-panel.qms-expansion .mat-expansion-panel-header .title-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;position:relative;height:inherit}.mat-expansion-panel.qms-expansion .mat-expansion-panel-header[aria-disabled=true]{color:rgba(0,0,0,.38);pointer-events:none}.mat-expansion-panel.qms-expansion .mat-expansion-panel-header[aria-disabled=true] .caption,.mat-expansion-panel.qms-expansion .mat-expansion-panel-header[aria-disabled=true] .leading-icon,.mat-expansion-panel.qms-expansion .mat-expansion-panel-header[aria-disabled=true] .mat-expansion-indicator:after,.mat-expansion-panel.qms-expansion .mat-expansion-panel-header[aria-disabled=true] .qms-line,.mat-expansion-panel.qms-expansion .mat-expansion-panel-header[aria-disabled=true] .subtitle{color:inherit}.mat-expansion-panel.qms-expansion .mat-expansion-panel-header:hover:not([aria-disabled=true]){background:rgba(0,0,0,.08)}.mat-expansion-panel.qms-expansion .mat-expansion-panel-header:active:not([aria-disabled=true]){background:rgba(0,0,0,.12)}.mat-expansion-panel.qms-expansion .mat-expansion-panel-header.cdk-keyboard-focused{border:2px solid #1954a9;border-radius:2px}.mat-expansion-panel.qms-expansion .mat-expansion-panel-header.active-item{color:#1954a9}.mat-expansion-panel.qms-expansion .mat-expansion-panel-header.active-item .caption,.mat-expansion-panel.qms-expansion .mat-expansion-panel-header.active-item .leading-icon,.mat-expansion-panel.qms-expansion .mat-expansion-panel-header.active-item .mat-expansion-indicator:after,.mat-expansion-panel.qms-expansion .mat-expansion-panel-header.active-item .qms-line,.mat-expansion-panel.qms-expansion .mat-expansion-panel-header.active-item .subtitle{color:inherit}.mat-expansion-panel.qms-expansion .mat-expansion-panel-body{padding:1rem 10px}.qms-list{padding-top:6px;font-family:Open Sans}.qms-list,.qms-list-item{display:block;-webkit-tap-highlight-color:transparent}.qms-list-item{width:100%;padding:0;min-height:40px}.qms-list-item.mat-2-line{height:63px}.qms-list-item.mat-2-line.image-item{height:56px}.qms-list-item.mat-3-line{height:81px}.qms-list-item.mat-multi-line{height:102px}.qms-list-item.image-item .qms-list-item-content{border-bottom:none}.qms-list-item.image-item .qms-list-text,.qms-list-item.image-item .trailing-box{height:100%;border-bottom:1px solid #e0e0e0}.qms-list-item.image-item .trailing-box{padding-top:10px}.qms-list-item.qms-list-item-disabled .caption,.qms-list-item.qms-list-item-disabled .qms-line,.qms-list-item.qms-list-item-disabled .subtitle,.qms-list-item.qms-list-item-disabled button,.qms-list-item.qms-list-item-disabled p,.qms-list-item.qms-list-item-disabled span{color:rgba(0,0,0,.38);pointer-events:none;cursor:default}.qms-list-item-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;position:relative;height:inherit;border-bottom:1px solid #e0e0e0;margin:0 1rem}.material-icons-outlined.leading-icon,mat-icon.leading-icon{flex-shrink:0;width:24px;height:24px;font-size:24px;box-sizing:content-box;border-radius:50%;color:rgba(0,0,0,.6);padding:4px 1rem 4px 4px}img.leading-icon{width:100%}.qms-list-text{padding-right:0;display:flex;flex-direction:column;flex:auto}.qms-line,.qms-list-text{box-sizing:border-box;overflow:hidden}.qms-line{line-height:22px;white-space:normal;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;padding:0;margin:0;font-weight:400;font-size:.875rem;color:rgba(0,0,0,.6)}.qms-line.size-lg{font-size:1rem}.qms-list-header .subtitle{line-height:22px;white-space:normal;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;padding:0;margin:0;box-sizing:border-box;color:#323232;font-weight:600;font-size:1rem;font-family:Raleway}.qms-list-header .subtitle.size-sm{font-size:.875rem}.qms-list-header .caption{line-height:16px;font-size:.75rem;color:rgba(0,0,0,.6);display:flex;justify-content:space-between}.qms-list-header .caption .mat-icon,.qms-list-header .caption .material-icons-outlined{font-size:20px}.qms-list-header .caption .overline{font-family:Raleway;font-weight:600}.trailing-box{display:flex}.trailing-box>*{padding-left:1.5rem}.trailing-box .caption{color:rgba(0,0,0,.6);font-size:.75rem}.trailing-box .caption .material-icons-outlined,.trailing-box .caption mat-icon{font-size:20px}.trailing-box button{color:rgba(0,0,0,.6);padding:0;margin-left:1rem}.default-subtitle{color:#323232}.wrap-image{box-sizing:content-box;color:rgba(0,0,0,.6);display:flex;flex-direction:row;justify-content:center;background:rgba(0,0,0,.12);margin-right:1rem;align-self:flex-start;margin-top:0}.wrap-image.image-circle,.wrap-image.image-circle img{width:40px;height:40px;border-radius:50%}.wrap-image.image-rect,.wrap-image.image-rect img{width:unset;height:56px;border-radius:2px}.wrap-image.image-square,.wrap-image.image-square img{width:56px;height:56px;border-radius:2px}.wrap-image .mat-icon{display:flex;-ms-grid-row-align:center;align-self:center;padding:0;height:auto}"]
            },] }
];
QMSList.ctorParameters = () => [
    { type: ElementRef }
];
export class QMSListItem {
    constructor(elRef, renderer) {
        this.elRef = elRef;
        this.renderer = renderer;
        this._disabled = false;
    }
    get disabled() { return this._disabled; }
    set disabled(value) {
        this._disabled = coerceBooleanProperty(value);
    }
    ngAfterViewInit() {
        if (this.type) {
            // this.renderer.setAttribute(this.elRef.nativeElement, 'class', 'qms-list-item image-item');
            this.renderer.addClass(this.elRef.nativeElement, 'image-item');
            this.renderer.addClass(this.elRef.nativeElement, this.type);
        }
        setLines(this._lines, this.elRef);
    }
}
QMSListItem.decorators = [
    { type: Component, args: [{
                selector: 'qms-list-item',
                template: "<div class=\"qms-list-item-content\">\r\n  <ng-template #content\r\n    ><ng-content select=\"[leading-icon]\"></ng-content\r\n  ></ng-template>\r\n  <div class=\"wrap-image {{type}}\" *ngIf=\"type\">\r\n    <ng-container *ngTemplateOutlet=\"content\"></ng-container>\r\n  </div>\r\n  <div class=\"wrap-icon\" *ngIf=\"!type\">\r\n    <ng-container *ngTemplateOutlet=\"content\"></ng-container>\r\n  </div>\r\n  <div class=\"qms-list-text\">\r\n    <ng-content select=\"[qms-list-header]\"></ng-content>\r\n    <ng-content select=\"[qms-line]\"></ng-content>\r\n  </div>\r\n  <div class=\"trailing-box\">\r\n    <ng-content></ng-content>\r\n  </div>\r\n</div>\r\n",
                host: {
                    'class': 'qms-list-item',
                    '[class.qms-list-item-disabled]': 'disabled',
                },
                encapsulation: ViewEncapsulation.None,
                changeDetection: ChangeDetectionStrategy.OnPush,
                styles: [".mat-expansion-panel.qms-expansion{background-color:transparent;box-shadow:none;border-bottom:1px solid #e0e0e0;margin:0 1rem;border-radius:0;font-family:Open Sans}.mat-expansion-panel.qms-expansion .mat-expansion-panel-header{height:40px;padding:0 10px;font-family:inherit}.mat-expansion-panel.qms-expansion .mat-expansion-panel-header.mat-2-line{height:63px}.mat-expansion-panel.qms-expansion .mat-expansion-panel-header.mat-3-line{height:81px}.mat-expansion-panel.qms-expansion .mat-expansion-panel-header .title-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;position:relative;height:inherit}.mat-expansion-panel.qms-expansion .mat-expansion-panel-header[aria-disabled=true]{color:rgba(0,0,0,.38);pointer-events:none}.mat-expansion-panel.qms-expansion .mat-expansion-panel-header[aria-disabled=true] .caption,.mat-expansion-panel.qms-expansion .mat-expansion-panel-header[aria-disabled=true] .leading-icon,.mat-expansion-panel.qms-expansion .mat-expansion-panel-header[aria-disabled=true] .mat-expansion-indicator:after,.mat-expansion-panel.qms-expansion .mat-expansion-panel-header[aria-disabled=true] .qms-line,.mat-expansion-panel.qms-expansion .mat-expansion-panel-header[aria-disabled=true] .subtitle{color:inherit}.mat-expansion-panel.qms-expansion .mat-expansion-panel-header:hover:not([aria-disabled=true]){background:rgba(0,0,0,.08)}.mat-expansion-panel.qms-expansion .mat-expansion-panel-header:active:not([aria-disabled=true]){background:rgba(0,0,0,.12)}.mat-expansion-panel.qms-expansion .mat-expansion-panel-header.cdk-keyboard-focused{border:2px solid #1954a9;border-radius:2px}.mat-expansion-panel.qms-expansion .mat-expansion-panel-header.active-item{color:#1954a9}.mat-expansion-panel.qms-expansion .mat-expansion-panel-header.active-item .caption,.mat-expansion-panel.qms-expansion .mat-expansion-panel-header.active-item .leading-icon,.mat-expansion-panel.qms-expansion .mat-expansion-panel-header.active-item .mat-expansion-indicator:after,.mat-expansion-panel.qms-expansion .mat-expansion-panel-header.active-item .qms-line,.mat-expansion-panel.qms-expansion .mat-expansion-panel-header.active-item .subtitle{color:inherit}.mat-expansion-panel.qms-expansion .mat-expansion-panel-body{padding:1rem 10px}.qms-list{padding-top:6px;font-family:Open Sans}.qms-list,.qms-list-item{display:block;-webkit-tap-highlight-color:transparent}.qms-list-item{width:100%;padding:0;min-height:40px}.qms-list-item.mat-2-line{height:63px}.qms-list-item.mat-2-line.image-item{height:56px}.qms-list-item.mat-3-line{height:81px}.qms-list-item.mat-multi-line{height:102px}.qms-list-item.image-item .qms-list-item-content{border-bottom:none}.qms-list-item.image-item .qms-list-text,.qms-list-item.image-item .trailing-box{height:100%;border-bottom:1px solid #e0e0e0}.qms-list-item.image-item .trailing-box{padding-top:10px}.qms-list-item.qms-list-item-disabled .caption,.qms-list-item.qms-list-item-disabled .qms-line,.qms-list-item.qms-list-item-disabled .subtitle,.qms-list-item.qms-list-item-disabled button,.qms-list-item.qms-list-item-disabled p,.qms-list-item.qms-list-item-disabled span{color:rgba(0,0,0,.38);pointer-events:none;cursor:default}.qms-list-item-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;position:relative;height:inherit;border-bottom:1px solid #e0e0e0;margin:0 1rem}.material-icons-outlined.leading-icon,mat-icon.leading-icon{flex-shrink:0;width:24px;height:24px;font-size:24px;box-sizing:content-box;border-radius:50%;color:rgba(0,0,0,.6);padding:4px 1rem 4px 4px}img.leading-icon{width:100%}.qms-list-text{padding-right:0;display:flex;flex-direction:column;flex:auto}.qms-line,.qms-list-text{box-sizing:border-box;overflow:hidden}.qms-line{line-height:22px;white-space:normal;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;padding:0;margin:0;font-weight:400;font-size:.875rem;color:rgba(0,0,0,.6)}.qms-line.size-lg{font-size:1rem}.qms-list-header .subtitle{line-height:22px;white-space:normal;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;padding:0;margin:0;box-sizing:border-box;color:#323232;font-weight:600;font-size:1rem;font-family:Raleway}.qms-list-header .subtitle.size-sm{font-size:.875rem}.qms-list-header .caption{line-height:16px;font-size:.75rem;color:rgba(0,0,0,.6);display:flex;justify-content:space-between}.qms-list-header .caption .mat-icon,.qms-list-header .caption .material-icons-outlined{font-size:20px}.qms-list-header .caption .overline{font-family:Raleway;font-weight:600}.trailing-box{display:flex}.trailing-box>*{padding-left:1.5rem}.trailing-box .caption{color:rgba(0,0,0,.6);font-size:.75rem}.trailing-box .caption .material-icons-outlined,.trailing-box .caption mat-icon{font-size:20px}.trailing-box button{color:rgba(0,0,0,.6);padding:0;margin-left:1rem}.default-subtitle{color:#323232}.wrap-image{box-sizing:content-box;color:rgba(0,0,0,.6);display:flex;flex-direction:row;justify-content:center;background:rgba(0,0,0,.12);margin-right:1rem;align-self:flex-start;margin-top:0}.wrap-image.image-circle,.wrap-image.image-circle img{width:40px;height:40px;border-radius:50%}.wrap-image.image-rect,.wrap-image.image-rect img{width:unset;height:56px;border-radius:2px}.wrap-image.image-square,.wrap-image.image-square img{width:56px;height:56px;border-radius:2px}.wrap-image .mat-icon{display:flex;-ms-grid-row-align:center;align-self:center;padding:0;height:auto}"]
            },] }
];
QMSListItem.ctorParameters = () => [
    { type: ElementRef },
    { type: Renderer2 }
];
QMSListItem.propDecorators = {
    type: [{ type: Input, args: ['type',] }],
    _lines: [{ type: ContentChildren, args: [QMSListLine, { descendants: true },] }]
};
//# sourceMappingURL=data:application/json;base64, 