import { Component, Input } from '@angular/core';
import { shuffle } from 'lodash';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "../../../../../ui-kit/formgroup/cs-checkbox/cs-checkbox.component";
export class PreviewCheckboxComponent {
    constructor() {
        this.choicesForPreviewMode = [];
    }
    ngOnInit() {
        this.choicesForPreviewMode = this.question.choices;
        if (this.question.randomize === true) {
            this.randomize();
        }
    }
    randomize() {
        this.choicesForPreviewMode = shuffle(this.choicesForPreviewMode);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PreviewCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PreviewCheckboxComponent, selector: "app-preview-checkbox", inputs: { question: "question" }, ngImport: i0, template: "<div class=\"preview-list\">\n    <ul class=\"vx-p-0 vx-m-0\">\n        <li class=\"vx-mb-3\" *ngFor=\"let choice of choicesForPreviewMode; let choiceIndex = index\">\n            <app-cs-checkbox>{{choice?.title ? choice?.title: 'Option' }}</app-cs-checkbox>\n        </li>\n        <li class=\"vx-mb-3\" *ngIf=\"question?.hasOther\">\n            <app-cs-checkbox> {{question.otherValue}}</app-cs-checkbox>\n        </li>\n    </ul>\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 .preview-list ul li{list-style-type:none}::ng-deep .preview-list ul li app-cs-checkbox{width:100%;display:block}::ng-deep .preview-list ul li app-cs-checkbox .checkbox-item{position:relative;padding-left:1.5rem;width:100%}::ng-deep .preview-list ul li app-cs-checkbox .checkbox-item .checkbox,::ng-deep .preview-list ul li app-cs-checkbox .checkbox-item .checkmark{position:absolute!important;top:0!important;left:0!important}::ng-deep .preview-list ul li app-cs-checkbox .checkbox-item .value{margin-left:0!important}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.CsCheckboxComponentUI, selector: "app-cs-checkbox", inputs: ["disabled", "ngValue", "value"], outputs: ["ngValueChange"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PreviewCheckboxComponent, decorators: [{
            type: Component,
            args: [{ selector: 'app-preview-checkbox', template: "<div class=\"preview-list\">\n    <ul class=\"vx-p-0 vx-m-0\">\n        <li class=\"vx-mb-3\" *ngFor=\"let choice of choicesForPreviewMode; let choiceIndex = index\">\n            <app-cs-checkbox>{{choice?.title ? choice?.title: 'Option' }}</app-cs-checkbox>\n        </li>\n        <li class=\"vx-mb-3\" *ngIf=\"question?.hasOther\">\n            <app-cs-checkbox> {{question.otherValue}}</app-cs-checkbox>\n        </li>\n    </ul>\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 .preview-list ul li{list-style-type:none}::ng-deep .preview-list ul li app-cs-checkbox{width:100%;display:block}::ng-deep .preview-list ul li app-cs-checkbox .checkbox-item{position:relative;padding-left:1.5rem;width:100%}::ng-deep .preview-list ul li app-cs-checkbox .checkbox-item .checkbox,::ng-deep .preview-list ul li app-cs-checkbox .checkbox-item .checkmark{position:absolute!important;top:0!important;left:0!important}::ng-deep .preview-list ul li app-cs-checkbox .checkbox-item .value{margin-left:0!important}\n"] }]
        }], ctorParameters: function () { return []; }, propDecorators: { question: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJldmlldy1jaGVja2JveC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy92eC13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