import { Component, Input } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "../../../pipes/is-read-more.pipe";
export class DescriptionPreviewComponent {
    constructor() {
        this.description = '';
        this.isExpand = false;
    }
    toggleExpansion() {
        this.isExpand = !this.isExpand;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DescriptionPreviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DescriptionPreviewComponent, selector: "app-description-preview", inputs: { questionIndex: "questionIndex", description: "description" }, ngImport: i0, template: "<div\n  [id]=\"'description_' + questionIndex\"\n  class=\"assessment-question-description vx-fs-12 vx-paragraph-txt\"\n  [class.expand]=\"isExpand\"\n  [innerHTML]=\"description\"\n></div>\n<div class=\"assessment-question-description-btn vx-d-flex vx-justify-end\">\n  <button\n    *ngIf=\"('description_' + questionIndex | isReadMore : 37) && !isExpand\"\n    (click)=\"toggleExpansion()\"\n    class=\"vx-fs-8 vx-fw-500 vx-txt-blue vx-tt-uppercase vx-p-0 vx-m-0\"\n  >\n    Read More\n  </button>\n  <button\n    *ngIf=\"isExpand && ('description_' + questionIndex | isReadMore : 37)\"\n    (click)=\"toggleExpansion()\"\n    class=\"vx-fs-8 vx-fw-500 vx-txt-blue vx-tt-uppercase vx-p-0 vx-m-0\"\n  >\n    Show Less\n  </button>\n</div>\n", 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/text/text.css\";@import\"https://cdn.v-comply.com/design-system/css/color/color.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 .assessment-question-description{width:96%;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;word-break:break-word;max-height:2.5rem;position:relative}::ng-deep .assessment-question-description.expand{display:block;-webkit-line-clamp:unset;-webkit-box-orient:unset;word-break:unset;max-height:unset}::ng-deep .assessment-question-description-btn{width:96%}::ng-deep .assessment-question-description-btn button{background:transparent;border-radius:0;border:none}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.IsReadMorePipe, name: "isReadMore" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DescriptionPreviewComponent, decorators: [{
            type: Component,
            args: [{ selector: 'app-description-preview', template: "<div\n  [id]=\"'description_' + questionIndex\"\n  class=\"assessment-question-description vx-fs-12 vx-paragraph-txt\"\n  [class.expand]=\"isExpand\"\n  [innerHTML]=\"description\"\n></div>\n<div class=\"assessment-question-description-btn vx-d-flex vx-justify-end\">\n  <button\n    *ngIf=\"('description_' + questionIndex | isReadMore : 37) && !isExpand\"\n    (click)=\"toggleExpansion()\"\n    class=\"vx-fs-8 vx-fw-500 vx-txt-blue vx-tt-uppercase vx-p-0 vx-m-0\"\n  >\n    Read More\n  </button>\n  <button\n    *ngIf=\"isExpand && ('description_' + questionIndex | isReadMore : 37)\"\n    (click)=\"toggleExpansion()\"\n    class=\"vx-fs-8 vx-fw-500 vx-txt-blue vx-tt-uppercase vx-p-0 vx-m-0\"\n  >\n    Show Less\n  </button>\n</div>\n", 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/text/text.css\";@import\"https://cdn.v-comply.com/design-system/css/color/color.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 .assessment-question-description{width:96%;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;word-break:break-word;max-height:2.5rem;position:relative}::ng-deep .assessment-question-description.expand{display:block;-webkit-line-clamp:unset;-webkit-box-orient:unset;word-break:unset;max-height:unset}::ng-deep .assessment-question-description-btn{width:96%}::ng-deep .assessment-question-description-btn button{background:transparent;border-radius:0;border:none}\n"] }]
        }], propDecorators: { questionIndex: [{
                type: Input
            }], description: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVzY3JpcHRpb24tcHJldmlldy5jb21wb25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