import { Component, EventEmitter, Input, Output } from '@angular/core';
const QmsStatusDropdownClassTypeMapping = {
    1: 'light',
    2: 'warning',
    3: 'success',
    4: 'danger'
};
export class QmsStatusDropdownComponent {
    constructor() {
        this.options = [];
        this.valueChange = new EventEmitter();
    }
    getClassType(type) {
        return QmsStatusDropdownClassTypeMapping[type];
    }
    onModelChange() {
        this.valueChange.emit(this.value);
    }
}
QmsStatusDropdownComponent.decorators = [
    { type: Component, args: [{
                selector: 'qms-status-dropdown',
                template: "<div\r\n  id=\"qms-status-dropdown-container\"\r\n  class=\"qms-status-dropdown-container {{ getClassType(value) }}\"\r\n>\r\n  <mat-form-field\r\n    class=\"material-custom-multiselect height-40\"\r\n    [style.width]=\"width\"\r\n  >\r\n    <mat-select\r\n      [(ngModel)]=\"value\"\r\n      (ngModelChange)=\"onModelChange()\"\r\n      disableOptionCentering\r\n    >\r\n      <ng-container *ngIf=\"options\">\r\n        <mat-option *ngFor=\"let option of options\" [value]=\"option.type\">\r\n          <label class=\"qms-label qms-label-{{ getClassType(option.type) }}\">{{\r\n            option.text\r\n          }}</label>\r\n        </mat-option>\r\n      </ng-container>\r\n    </mat-select>\r\n  </mat-form-field>\r\n</div>\r\n",
                styles: [".qms-status-dropdown-container ::ng-deep .material-custom-multiselect{height:40px}.qms-status-dropdown-container ::ng-deep .material-custom-multiselect.mat-focused{outline:1px solid #1954a9;border-radius:2px}.qms-status-dropdown-container ::ng-deep .material-custom-multiselect .mat-form-field-flex{border-radius:2px;padding:0 17.5px 0 16px;width:100%;height:40px}.qms-status-dropdown-container ::ng-deep .material-custom-multiselect .mat-form-field-flex .mat-select-min-line{font-family:Open Sans;font-size:14px;font-weight:600;line-height:16px;letter-spacing:1px}.qms-status-dropdown-container ::ng-deep .material-custom-multiselect .mat-form-field-infix{padding-top:0;border-top:10px solid transparent}.qms-status-dropdown-container ::ng-deep .material-custom-multiselect .mat-form-field-infix .mat-select-value-text{line-height:16px}.qms-status-dropdown-container ::ng-deep .material-custom-multiselect .mat-form-field-wrapper .mat-form-field-underline{display:none}.qms-status-dropdown-container.warning ::ng-deep .material-custom-multiselect .mat-form-field-flex{background-color:#e4cf53}.qms-status-dropdown-container.warning ::ng-deep .material-custom-multiselect .mat-form-field-flex .mat-select-arrow-wrapper .mat-select-arrow{color:rgba(0,0,0,.6)}.qms-status-dropdown-container.warning ::ng-deep .material-custom-multiselect .mat-select-value{color:#323232}.qms-status-dropdown-container.warning ::ng-deep .material-custom-multiselect .mat-select-arrow{color:#323232}.qms-status-dropdown-container.light ::ng-deep .material-custom-multiselect .mat-form-field-flex{background-color:rgba(0,0,0,.1)}.qms-status-dropdown-container.light ::ng-deep .material-custom-multiselect .mat-form-field-flex .mat-select-arrow-wrapper .mat-select-arrow{color:rgba(0,0,0,.6)}.qms-status-dropdown-container.light ::ng-deep .material-custom-multiselect .mat-select-value{color:#323232}.qms-status-dropdown-container.light ::ng-deep .material-custom-multiselect .mat-select-arrow{color:#323232}.qms-status-dropdown-container.danger ::ng-deep .material-custom-multiselect .mat-form-field-flex{background-color:#9e360f}.qms-status-dropdown-container.danger ::ng-deep .material-custom-multiselect .mat-form-field-flex .mat-select-arrow-wrapper .mat-select-arrow{color:hsla(0,0%,100%,.6)}.qms-status-dropdown-container.danger ::ng-deep .material-custom-multiselect .mat-select-value{color:#fff}.qms-status-dropdown-container.danger ::ng-deep .material-custom-multiselect .mat-select-arrow{color:#fff}.qms-status-dropdown-container.success ::ng-deep .material-custom-multiselect .mat-form-field-flex{background-color:#005832}.qms-status-dropdown-container.success ::ng-deep .material-custom-multiselect .mat-select-value{color:#fff}.qms-status-dropdown-container.success ::ng-deep .material-custom-multiselect .mat-select-arrow{color:#fff}.qms-status-dropdown-container.success ::ng-deep .material-custom-multiselect .mat-select-arrow-wrapper .mat-select-arrow{color:hsla(0,0%,100%,.6)}.qms-status-dropdown-container ::ng-deep mat-select .mat-select-value{font-size:14px;line-height:16px;color:#323232;font-weight:500}.qms-status-dropdown-container ::ng-deep mat-select .mat-select-arrow-wrapper{padding-top:17.5px}.qms-status-dropdown-container ::ng-deep mat-select .mat-select-arrow-wrapper .mat-select-arrow{border-top:4px solid}.qms-status-dropdown-container ::ng-deep mat-option .mat-option-custom .mat-pseudo-checkbox-checked:after{top:3px;width:11px;height:5px;border-left:3px solid}"]
            },] }
];
QmsStatusDropdownComponent.propDecorators = {
    options: [{ type: Input }],
    value: [{ type: Input }],
    width: [{ type: Input }],
    valueChange: [{ type: Output }]
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicW1zLXN0YXR1cy1kcm9wZG93bi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9xbXMtYW5ndWxhci9zcmMvbGliL2NvbXBvbmVudHMvcW1zLXN0YXR1cy1kcm9wZG93bi9xbXMtc3RhdHVzLWRyb3Bkb3duLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLFlBQVksRUFBRSxLQUFLLEVBQUUsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBR3ZFLE1BQU0saUNBQWlDLEdBQUc7SUFDdEMsQ0FBQyxFQUFFLE9BQU87SUFDVixDQUFDLEVBQUUsU0FBUztJQUNaLENBQUMsRUFBRSxTQUFTO0lBQ1osQ0FBQyxFQUFFLFFBQVE7Q0FDZCxDQUFBO0FBT0QsTUFBTSxPQUFPLDBCQUEwQjtJQUx2QztRQU1hLFlBQU8sR0FBOEIsRUFBRSxDQUFDO1FBSXZDLGdCQUFXLEdBQUcsSUFBSSxZQUFZLEVBQXlCLENBQUM7SUFTdEUsQ0FBQztJQVBHLFlBQVksQ0FBQyxJQUEyQjtRQUNwQyxPQUFPLGlDQUFpQyxDQUFDLElBQUksQ0FBQyxDQUFDO0lBQ25ELENBQUM7SUFFRCxhQUFhO1FBQ1Qs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