/**
 * @fileoverview added by tsickle
 * Generated from: lib/truncated-text-toggle/index.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import { Component, Input } from "@angular/core";
var TruncatedTextToggleComponent = /** @class */ (function () {
    function TruncatedTextToggleComponent() {
        this.showData = "";
        this.showExpandMoreBtn = false;
        this.showCollapseBtn = false;
    }
    /**
     * @return {?}
     */
    TruncatedTextToggleComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        if (this.data.length > this.maximum) {
            this.showExpandMoreBtn = true;
            this.showData = this.data.substring(0, this.maximum) + "...";
        }
        else {
            this.showData = this.data;
        }
    };
    /**
     * @return {?}
     */
    TruncatedTextToggleComponent.prototype.showAll = /**
     * @return {?}
     */
    function () {
        this.showExpandMoreBtn = false;
        this.showCollapseBtn = true;
        this.showData = this.data;
    };
    /**
     * @return {?}
     */
    TruncatedTextToggleComponent.prototype.collapse = /**
     * @return {?}
     */
    function () {
        this.showExpandMoreBtn = true;
        this.showCollapseBtn = false;
        this.showData = this.data.substring(0, this.maximum) + "...";
    };
    TruncatedTextToggleComponent.decorators = [
        { type: Component, args: [{
                    selector: "truncated-text-toggle",
                    template: "<div class=\"click-show-more-content\">\r\n  <span>{{ showData }}</span>\r\n  <span *ngIf=\"showExpandMoreBtn\" class=\"show-more\" (click)=\"showAll()\">\r\n    Read More\r\n    <img src=\"./assets/img/click_show_more_icon.svg\" alt=\"\" />\r\n  </span>\r\n  <div\r\n    class=\"show-more collapse-btn\"\r\n    (click)=\"collapse()\"\r\n    *ngIf=\"showCollapseBtn\"\r\n  >\r\n    Collapse\r\n    <img src=\"./assets/img/click_show_more_icon.svg\" alt=\"\" />\r\n  </div>\r\n</div>\r\n",
                    styles: [".click-show-more-content{word-wrap:break-word}.click-show-more-content .show-more{cursor:pointer;color:#1364b3;font-size:11px;margin-left:4px;vertical-align:middle}.click-show-more-content .show-more img{margin-left:2px;vertical-align:middle}.click-show-more-content .collapse-btn{display:flex;align-items:center;justify-content:flex-end}.click-show-more-content .collapse-btn img{transform:rotate(-180deg)}"]
                }] }
    ];
    /** @nocollapse */
    TruncatedTextToggleComponent.ctorParameters = function () { return []; };
    TruncatedTextToggleComponent.propDecorators = {
        data: [{ type: Input }],
        maximum: [{ type: Input }]
    };
    return TruncatedTextToggleComponent;
}());
export { TruncatedTextToggleComponent };
if (false) {
    /** @type {?} */
    TruncatedTextToggleComponent.prototype.data;
    /** @type {?} */
    TruncatedTextToggleComponent.prototype.maximum;
    /** @type {?} */
    TruncatedTextToggleComponent.prototype.showData;
    /** @type {?} */
    TruncatedTextToggleComponent.prototype.showExpandMoreBtn;
    /** @type {?} */
    TruncatedTextToggleComponent.prototype.showCollapseBtn;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vcmFpc2UtY29tbW9uLWxpYi8iLCJzb3VyY2VzIjpbImxpYi90cnVuY2F0ZWQtdGV4dC10b2dnbGUvaW5kZXguY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQVUsTUFBTSxlQUFlLENBQUM7QUFFekQ7SUFZQztRQUpBLGFBQVEsR0FBVyxFQUFFLENBQUM7UUFDdEIsc0JBQWlCLEdBQVksS0FBSyxDQUFDO1FBQ25DLG9CQUFlLEdBQVksS0FBSyxDQUFDO0lBRWxCLENBQUM7Ozs7SUFFaEIsK0NBQVE7OztJQUFSO1FBQ0MsSUFBSSxJQUFJLENBQUMsSUFBSSxDQUFDLE1BQU0sR0FBRyxJQUFJLENBQUMsT0FBTyxFQUFFO1lBQ3BDLElBQUksQ0FBQyxpQkFBaUIsR0FBRyxJQUFJLENBQUM7WUFDOUIsSUFBSSxDQUFDLFFBQVEsR0FBRyxJQUFJLENBQUM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