import { Component, EventEmitter, Input, Output } from '@angular/core';
import { DISCLAIMER_TEXT } from '../inspire-library.const';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "../pipe/truncate-string.pipe";
function DisclaimerComponent_button_8_Template(rf, ctx) { if (rf & 1) {
    const _r2 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 8);
    i0.ɵɵlistener("click", function DisclaimerComponent_button_8_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r1 = i0.ɵɵnextContext(); return ctx_r1.toggleDisclaimerText(); });
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(ctx_r0.readFull ? "Read Less" : "Read More");
} }
export class DisclaimerComponent {
    constructor() {
        this.isMobile = false;
        this.showDisclaimer = false;
        this.dismiss = new EventEmitter();
        this.readFull = false;
        this.disclaimerText = DISCLAIMER_TEXT;
    }
    ngOnInit() {
    }
    onDismiss() {
        this.dismiss.emit();
    }
    toggleDisclaimerText() {
        this.readFull = !this.readFull;
    }
}
DisclaimerComponent.ɵfac = function DisclaimerComponent_Factory(t) { return new (t || DisclaimerComponent)(); };
DisclaimerComponent.ɵcmp = i0.ɵɵdefineComponent({ type: DisclaimerComponent, selectors: [["ins-disclaimer"]], inputs: { isMobile: "isMobile", showDisclaimer: "showDisclaimer" }, outputs: { dismiss: "dismiss" }, decls: 11, vars: 9, consts: [[1, "widget-pack", "community-disclaimer-widget"], [1, "wp-head"], [1, "wp-title"], [1, "wp-body"], ["id", "disclaimer_text", 1, "cdw-desc", 3, "innerHTML"], [1, "wp-foot"], ["class", "cdw-btn cdw-more-btn", "type", "button", "id", "read_more_less", 3, "click", 4, "ngIf"], ["type", "button", "id", "disclaimer_dismiss", 1, "cdw-btn", "cdw-dismiss-btn", 3, "click"], ["type", "button", "id", "read_more_less", 1, "cdw-btn", "cdw-more-btn", 3, "click"]], template: function DisclaimerComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "section", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵelementStart(2, "h1", 2);
        i0.ɵɵtext(3, "Disclaimer");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(4, "div", 3);
        i0.ɵɵelement(5, "p", 4);
        i0.ɵɵpipe(6, "truncateString");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(7, "div", 5);
        i0.ɵɵtemplate(8, DisclaimerComponent_button_8_Template, 2, 1, "button", 6);
        i0.ɵɵelementStart(9, "button", 7);
        i0.ɵɵlistener("click", function DisclaimerComponent_Template_button_click_9_listener() { return ctx.onDismiss(); });
        i0.ɵɵtext(10, "Dismiss");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵclassProp("disclaimer-mobile-panel", ctx.isMobile)("active", ctx.isMobile && ctx.showDisclaimer);
        i0.ɵɵadvance(5);
        i0.ɵɵproperty("innerHTML", i0.ɵɵpipeBind2(6, 6, ctx.disclaimerText, ctx.readFull || ctx.isMobile ? 0 : 165), i0.ɵɵsanitizeHtml);
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngIf", !ctx.isMobile);
    } }, directives: [i1.NgIf], pipes: [i2.TruncateStringPipe], styles: ["a[_ngcontent-%COMP%]{text-decoration:none}*[_ngcontent-%COMP%]{font-family:Lato,sans-serif;outline:0}.widget-pack[_ngcontent-%COMP%]{background:#fff;border-radius:.5rem;padding:.9375rem}.wp-body[_ngcontent-%COMP%], .wp-foot[_ngcontent-%COMP%]{margin-top:.9375rem}.wp-title[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;color:#061a73;margin:0;font-family:Lato,sans-serif}.wp-link[_ngcontent-%COMP%]{color:#6e6f70;font-size:.875rem;cursor:pointer}.wp-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.cdw-btn[_ngcontent-%COMP%]{border:none;border-radius:.5rem;line-height:1;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0 1rem;transition:.3s ease-in-out;background:0 0;min-width:6.875rem;height:2rem;font-size:.875rem}.cdw-btn[_ngcontent-%COMP%]:hover{background:#f8f9fb}.cdw-btn[disabled][_ngcontent-%COMP%]{background:#c6cbc9;color:#6e6f70;cursor:default}.cdw-dismiss-btn[_ngcontent-%COMP%]{background:#009dfc;color:#fff}.cdw-dismiss-btn[_ngcontent-%COMP%]:not([disabled]):hover{background:#008de3}.cdw-desc[_ngcontent-%COMP%]{font-size:.875rem;color:#000;margin:0}.cdw-dismiss-btn[_ngcontent-%COMP%]{margin-left:1.25rem}.wp-foot[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-top:1.25rem}.cdw-more-btn[_ngcontent-%COMP%]{color:#6e6f70}@media (max-width:1299px){.disclaimer-mobile-panel[_ngcontent-%COMP%]{position:fixed;top:212px;z-index:1;bottom:0;left:0;right:0;border-radius:0;padding:0;transition:.3s ease-in-out;transform:translateY(100%)}.disclaimer-mobile-panel.active[_ngcontent-%COMP%]{transform:translateY(0)}.disclaimer-mobile-panel[_ngcontent-%COMP%]   .wp-head[_ngcontent-%COMP%]{height:50px;display:flex;align-items:center;justify-content:center;border-bottom:1px solid #e2e5e4;position:relative}.disclaimer-mobile-panel[_ngcontent-%COMP%]   .wp-title[_ngcontent-%COMP%]{color:#000}.disclaimer-mobile-panel[_ngcontent-%COMP%]   .wp-body[_ngcontent-%COMP%]{padding:25px;margin:0}.disclaimer-mobile-panel[_ngcontent-%COMP%]   .wp-foot[_ngcontent-%COMP%]{padding:0 25px}}"] });
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(DisclaimerComponent, [{
        type: Component,
        args: [{
                selector: 'ins-disclaimer',
                templateUrl: './disclaimer.component.html',
                styleUrls: ['./disclaimer.component.scss']
            }]
    }], function () { return []; }, { isMobile: [{
            type: Input
        }], showDisclaimer: [{
            type: Input
        }], dismiss: [{
            type: Output
        }] }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlzY2xhaW1lci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9pbnNwaXJlLWxpYnJhcnkvIiwic291cmNlcyI6WyJsaWIvZGlzY2xhaW1lci9kaXNjbGFpbWVyLmNvbXBvbmVudC50cyIsImxpYi9kaXNjbGFpbWVyL2Rpc2NsYWltZXIuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxZQUFZLEVBQUUsS0FBSyxFQUFVLE1BQU0sRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMvRSxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sMEJBQTBCLENBQUM7Ozs7OztJQ092RCxpQ0FBMEg7SUFBakMsb01BQWdDO0lBQUMsWUFBb0M7SUFBQSxpQkFBUzs7O0lBQTdDLGVBQW9DO0lBQXBDLGlFQUFvQzs7QURBbEssTUFBTSxPQUFPLG1CQUFtQjtJQVM5QjtRQVJTLGFBQVEsR0FBWSxLQUFLLENBQUM7UUFDMUIsbUJBQWMsR0FBWSxLQUFLLENBQUM7UUFFL0IsWUFBTyxHQUF1QixJQUFJLFlBQVksRUFBRSxDQUFDO1FBRTNELGFBQVEsR0FBWSxLQUFLLENBQUM7UUFDMUIsbUJBQWMsR0FBVyxlQUFlLENBQUM7SUFFekIsQ0FBQztJQUVqQixRQUFRO0lBQ1IsQ0FBQztJQUVELFNBQVM7UUFDUCxJQUFJLENBQUMsT0FBTyxDQUFDLElBQUksRUFBRSxDQUFDO0lBQ3RCLENBQUM7SUFFRCxvQkFBb0I7UUFDbEIsSUFBSSxDQUFDLFFBQVEsR0FBRyxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUM7SUFDakMsQ0FBQzs7c0ZBcEJVLG1CQUFtQjt3REFBbk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