import { Component, EventEmitter, Input, Output } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "../../../../../ui-kit/formgroup/cs-select/cs-select.component";
export class LogicDropdownComponent {
    set questionSet(value) {
        this.question = value;
        if (this.question.hasOther) {
            this.question.choices.push({ title: 'Other', value: 'Other' });
        }
    }
    constructor() {
        this.changeEvent = new EventEmitter();
    }
    ngOnInit() {
    }
    emitChange(choice) {
        this.changeEvent.emit({ choice: { title: choice } });
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LogicDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: LogicDropdownComponent, selector: "app-logic-dropdown", inputs: { question: "question", questionSet: ["question", "questionSet"] }, outputs: { changeEvent: "changeEvent" }, ngImport: i0, template: "<div class=\"logic-dropdown\">\n    <app-cs-select [dataList]='question?.choices' [valueKey]=\"'title'\" [displayProperty]=\"'title'\" [selectedValue]=\"'Select an option'\" (selectedValueChange)=\"emitChange($event)\"></app-cs-select>\n</div>", styles: ["@import\"https://cdn.v-comply.com/design-system/css/icons/icons.css\";@import\"https://cdn.v-comply.com/design-system/css/mixin/mixin.css\";@import\"https://cdn.v-comply.com/design-system/css/display/display.css\";@import\"https://cdn.v-comply.com/design-system/css/alignment/alignment.css\";@import\"https://cdn.v-comply.com/design-system/css/color/color.css\";@import\"https://cdn.v-comply.com/design-system/css/text/text.css\";@import\"https://cdn.v-comply.com/design-system/css/width/width.css\";@import\"https://cdn.v-comply.com/design-system/css/margin/margin.css\";@import\"https://cdn.v-comply.com/design-system/css/margin/margin-top.css\";@import\"https://cdn.v-comply.com/design-system/css/margin/margin-bottom.css\";@import\"https://cdn.v-comply.com/design-system/css/margin/margin-left.css\";@import\"https://cdn.v-comply.com/design-system/css/margin/margin-right.css\";@import\"https://cdn.v-comply.com/design-system/css/padding/padding.css\";@import\"https://cdn.v-comply.com/design-system/css/padding/padding-top.css\";@import\"https://cdn.v-comply.com/design-system/css/padding/padding-bottom.css\";@import\"https://cdn.v-comply.com/design-system/css/padding/padding-left.css\";@import\"https://cdn.v-comply.com/design-system/css/padding/padding-right.css\";::ng-deep .logic-dropdown{width:37.5rem}::ng-deep .logic-dropdown app-cs-select .input-group .custom-select-box input{height:2.5rem!important}\n"], dependencies: [{ kind: "component", type: i1.CsSelectComponentUI, selector: "app-cs-select", inputs: ["dataList", "dropdownLabel", "displayProperty", "selectedValue", "isRequired", "dropdownSubLabel", "disabled", "placeholder", "stylex", "valueKey", "multipleSelect", "colorProperty", "colorSelected"], outputs: ["selectedData", "selectedValueChange"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LogicDropdownComponent, decorators: [{
            type: Component,
            args: [{ selector: 'app-logic-dropdown', template: "<div class=\"logic-dropdown\">\n    <app-cs-select [dataList]='question?.choices' [valueKey]=\"'title'\" [displayProperty]=\"'title'\" [selectedValue]=\"'Select an option'\" (selectedValueChange)=\"emitChange($event)\"></app-cs-select>\n</div>", styles: ["@import\"https://cdn.v-comply.com/design-system/css/icons/icons.css\";@import\"https://cdn.v-comply.com/design-system/css/mixin/mixin.css\";@import\"https://cdn.v-comply.com/design-system/css/display/display.css\";@import\"https://cdn.v-comply.com/design-system/css/alignment/alignment.css\";@import\"https://cdn.v-comply.com/design-system/css/color/color.css\";@import\"https://cdn.v-comply.com/design-system/css/text/text.css\";@import\"https://cdn.v-comply.com/design-system/css/width/width.css\";@import\"https://cdn.v-comply.com/design-system/css/margin/margin.css\";@import\"https://cdn.v-comply.com/design-system/css/margin/margin-top.css\";@import\"https://cdn.v-comply.com/design-system/css/margin/margin-bottom.css\";@import\"https://cdn.v-comply.com/design-system/css/margin/margin-left.css\";@import\"https://cdn.v-comply.com/design-system/css/margin/margin-right.css\";@import\"https://cdn.v-comply.com/design-system/css/padding/padding.css\";@import\"https://cdn.v-comply.com/design-system/css/padding/padding-top.css\";@import\"https://cdn.v-comply.com/design-system/css/padding/padding-bottom.css\";@import\"https://cdn.v-comply.com/design-system/css/padding/padding-left.css\";@import\"https://cdn.v-comply.com/design-system/css/padding/padding-right.css\";::ng-deep .logic-dropdown{width:37.5rem}::ng-deep .logic-dropdown app-cs-select .input-group .custom-select-box input{height:2.5rem!important}\n"] }]
        }], ctorParameters: function () { return []; }, propDecorators: { question: [{
                type: Input
            }], questionSet: [{
                type: Input,
                args: ['question']
            }], changeEvent: [{
                type: Output
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9naWMtZHJvcGRvd24uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdngtd29ya2Zsb3ctZW5naW5lL3NyYy9saWIvc2hhcmVkQ29tcG9uZW50cy9hc3Nlc3NtZW50LWVkaXRvci9jb21wb25lbnRzL2xvZ2ljLXF1ZXN0aW9ucy9sb2dpYy1kcm9wZG93bi9sb2dpYy1kcm9wZG93bi5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy92eC13b3JrZmxvdy1lbmdpbmUvc3JjL2xpYi9zaGFyZWRDb21wb25lbnRzL2Fzc2Vzc21lbnQtZWRpdG9yL2NvbXBvbmVudHMvbG9naWMtcXVlc3Rpb25zL2xvZ2ljLWRyb3Bkb3duL2xvZ2ljLWRyb3Bkb3duLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsWUFBWSxFQUFFLEtBQUssRUFBVSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7OztBQU8vRSxNQUFNLE9BQU8sc0JBQXNCO0lBR2pDLElBQXVCLFdBQVcsQ0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