import { Component, Input, output } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@seniorsistemas/angular-components/common";
import * as i3 from "../insights-card/insights-card.component";
import * as i4 from "@ngx-translate/core";
export class InsightsSidebarComponent {
    insights = [];
    hasPermission = false;
    introText;
    introTemplate = null;
    emptyText;
    emptyTemplate = null;
    noPermissionText;
    noPermissionTemplate = null;
    closedSidebar = output();
    openedSidebar = output();
    opened = false;
    toggle() {
        const newState = !this.opened;
        if (newState) {
            this.open();
        }
        else {
            this.close();
        }
    }
    open() {
        this.opened = true;
        this.openedSidebar.emit();
    }
    close() {
        this.opened = false;
        this.closedSidebar.emit();
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InsightsSidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: InsightsSidebarComponent, selector: "s-insights-sidebar", inputs: { insights: "insights", hasPermission: "hasPermission", introText: "introText", introTemplate: "introTemplate", emptyText: "emptyText", emptyTemplate: "emptyTemplate", noPermissionText: "noPermissionText", noPermissionTemplate: "noPermissionTemplate" }, outputs: { closedSidebar: "closedSidebar", openedSidebar: "openedSidebar" }, ngImport: i0, template: "<div\n    class=\"sidebar\"\n    [class.opened]=\"opened\">\n    <div class=\"header\">\n        <button (click)=\"close()\" class=\"option\">\n            <span class=\"far fa-chevron-double-right\"></span>\n        </button>\n        <div class=\"title\">\n            <span><ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container></span>\n            <span>IAssist Insights</span>\n        </div>\n    </div>\n    <div class=\"intro\">\n        <ng-container *ngIf=\"hasPermission; then permissionBlock; else noPermissionBlock\"></ng-container>\n\n        <ng-template #permissionBlock>\n            <ng-container *ngIf=\"insights.length; then introBlock; else emptyBlock\"></ng-container>\n\n            <ng-template #introBlock>\n                <ng-container *ngIf=\"introTemplate; then introCustomBlock; else introTextBlock\"></ng-container>\n\n                <ng-template #introCustomBlock>\n                    <ng-container *ngTemplateOutlet=\"introTemplate\"></ng-container>\n                </ng-template>\n\n                <ng-template #introTextBlock>\n                    <span class=\"text\">{{ introText || \"platform.angular_components.insight_intro\" | translate }}</span>\n                </ng-template>\n            </ng-template>\n\n            <ng-template #emptyBlock>\n                <ng-container *ngIf=\"emptyTemplate; then emptyCustomBlock; else emptyTextBlock\"></ng-container>\n\n                <ng-template #emptyCustomBlock>\n                    <ng-container *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\n                </ng-template>\n\n                <ng-template #emptyTextBlock>\n                    <span class=\"text\">{{ emptyText || \"platform.angular_components.insight_empty\" | translate }}</span>\n                </ng-template>\n            </ng-template>\n        </ng-template>\n\n        <ng-template #noPermissionBlock>\n            <ng-container *ngIf=\"noPermissionTemplate; then noPermissionCustomBlock; else noPermissionTextBlock\"></ng-container>\n\n            <ng-template #noPermissionCustomBlock>\n                <ng-container *ngTemplateOutlet=\"noPermissionTemplate\"></ng-container>\n            </ng-template>\n\n            <ng-template #noPermissionTextBlock>\n                <span>{{ noPermissionText || \"platform.angular_components.insight_no_permission\" | translate }}</span>\n            </ng-template>\n        </ng-template>\n    </div>\n    <div class=\"insights\">\n        <ng-container *ngIf=\"insights.length\">\n            <s-insights-card\n                *ngFor=\"let insight of insights\"\n                [insight]=\"insight\">\n            </s-insights-card>\n        </ng-container>\n    </div>\n</div>\n\n<ng-template #iassistIcon>\n    <div style=\"width: 28px; height: 28px;\">\n        <span *sSVGFactory=\"'iassist'\"></span>\n    </div>\n</ng-template>\n", styles: [".sidebar{background-color:#fff;border-left:1px solid #dedce5;height:100%;overflow-x:hidden;position:fixed;right:-25%;transition:.5s;top:0;width:25%;z-index:1002}.sidebar .header{border-bottom:1px solid #dedce5;display:flex;gap:16px;padding:12px 20px}.sidebar .header .option{background-color:transparent;border:none;color:#428bca;cursor:pointer;font-size:16px;padding:12px}.sidebar .header .title{align-items:center;color:#212533;display:flex;font-family:Open Sans,sans-serif;font-size:16px;gap:16px;line-height:1;-webkit-user-select:none;user-select:none}.sidebar .intro{margin:8px 40px}.sidebar .intro .text{color:#212533;display:flex;font-family:Open Sans,sans-serif;font-size:14px;justify-content:center;line-height:1.5;text-align:center;-webkit-user-select:none;user-select:none}.sidebar.opened{right:0}.sidebar.opened .insights{padding:12px}.insights{display:flex;flex-direction:column;gap:12px}@media (max-width: 1366px){.sidebar{right:-50%;width:50%}}@media (max-width: 768px){.sidebar{right:-75%;width:75%}}@media (max-width: 600px){.sidebar{right:-100%;width:100%}}\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: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.SVGFactoryDirective, selector: "[sSVGFactory]", inputs: ["sSVGFactory"] }, { kind: "component", type: i3.InsightsCardComponent, selector: "s-insights-card", inputs: ["insight"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InsightsSidebarComponent, decorators: [{
            type: Component,
            args: [{ selector: 's-insights-sidebar', template: "<div\n    class=\"sidebar\"\n    [class.opened]=\"opened\">\n    <div class=\"header\">\n        <button (click)=\"close()\" class=\"option\">\n            <span class=\"far fa-chevron-double-right\"></span>\n        </button>\n        <div class=\"title\">\n            <span><ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container></span>\n            <span>IAssist Insights</span>\n        </div>\n    </div>\n    <div class=\"intro\">\n        <ng-container *ngIf=\"hasPermission; then permissionBlock; else noPermissionBlock\"></ng-container>\n\n        <ng-template #permissionBlock>\n            <ng-container *ngIf=\"insights.length; then introBlock; else emptyBlock\"></ng-container>\n\n            <ng-template #introBlock>\n                <ng-container *ngIf=\"introTemplate; then introCustomBlock; else introTextBlock\"></ng-container>\n\n                <ng-template #introCustomBlock>\n                    <ng-container *ngTemplateOutlet=\"introTemplate\"></ng-container>\n                </ng-template>\n\n                <ng-template #introTextBlock>\n                    <span class=\"text\">{{ introText || \"platform.angular_components.insight_intro\" | translate }}</span>\n                </ng-template>\n            </ng-template>\n\n            <ng-template #emptyBlock>\n                <ng-container *ngIf=\"emptyTemplate; then emptyCustomBlock; else emptyTextBlock\"></ng-container>\n\n                <ng-template #emptyCustomBlock>\n                    <ng-container *ngTemplateOutlet=\"emptyTemplate\"></ng-container>\n                </ng-template>\n\n                <ng-template #emptyTextBlock>\n                    <span class=\"text\">{{ emptyText || \"platform.angular_components.insight_empty\" | translate }}</span>\n                </ng-template>\n            </ng-template>\n        </ng-template>\n\n        <ng-template #noPermissionBlock>\n            <ng-container *ngIf=\"noPermissionTemplate; then noPermissionCustomBlock; else noPermissionTextBlock\"></ng-container>\n\n            <ng-template #noPermissionCustomBlock>\n                <ng-container *ngTemplateOutlet=\"noPermissionTemplate\"></ng-container>\n            </ng-template>\n\n            <ng-template #noPermissionTextBlock>\n                <span>{{ noPermissionText || \"platform.angular_components.insight_no_permission\" | translate }}</span>\n            </ng-template>\n        </ng-template>\n    </div>\n    <div class=\"insights\">\n        <ng-container *ngIf=\"insights.length\">\n            <s-insights-card\n                *ngFor=\"let insight of insights\"\n                [insight]=\"insight\">\n            </s-insights-card>\n        </ng-container>\n    </div>\n</div>\n\n<ng-template #iassistIcon>\n    <div style=\"width: 28px; height: 28px;\">\n        <span *sSVGFactory=\"'iassist'\"></span>\n    </div>\n</ng-template>\n", styles: [".sidebar{background-color:#fff;border-left:1px solid #dedce5;height:100%;overflow-x:hidden;position:fixed;right:-25%;transition:.5s;top:0;width:25%;z-index:1002}.sidebar .header{border-bottom:1px solid #dedce5;display:flex;gap:16px;padding:12px 20px}.sidebar .header .option{background-color:transparent;border:none;color:#428bca;cursor:pointer;font-size:16px;padding:12px}.sidebar .header .title{align-items:center;color:#212533;display:flex;font-family:Open Sans,sans-serif;font-size:16px;gap:16px;line-height:1;-webkit-user-select:none;user-select:none}.sidebar .intro{margin:8px 40px}.sidebar .intro .text{color:#212533;display:flex;font-family:Open Sans,sans-serif;font-size:14px;justify-content:center;line-height:1.5;text-align:center;-webkit-user-select:none;user-select:none}.sidebar.opened{right:0}.sidebar.opened .insights{padding:12px}.insights{display:flex;flex-direction:column;gap:12px}@media (max-width: 1366px){.sidebar{right:-50%;width:50%}}@media (max-width: 768px){.sidebar{right:-75%;width:75%}}@media (max-width: 600px){.sidebar{right:-100%;width:100%}}\n"] }]
        }], propDecorators: { insights: [{
                type: Input
            }], hasPermission: [{
                type: Input
            }], introText: [{
                type: Input
            }], introTemplate: [{
                type: Input
            }], emptyText: [{
                type: Input
            }], emptyTemplate: [{
                type: Input
            }], noPermissionText: [{
                type: Input
            }], noPermissionTemplate: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64, 