/*
 * Copyright 2015-2024 Ritense BV, the Netherlands.
 *
 * Licensed under EUPL, Version 1.2 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import { Component } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
export class FilterSidebarComponent {
    constructor() {
        this.filterSidebar = localStorage.getItem('filterSidebar') || 'show';
    }
    ngOnInit() {
        if (this.filterSidebar === 'show') {
            localStorage.setItem('filterSidebar', 'show');
            $('.be-content').addClass('be-aside');
        }
        $('[data-toggle="tooltip"]').tooltip();
    }
    ngOnDestroy() {
        $('.be-content').removeClass('be-aside');
    }
    toggleFilterSidebar() {
        const beContent = $('.be-content');
        beContent.toggleClass('be-aside');
        this.filterSidebar = beContent.hasClass('be-aside') ? 'show' : 'hide';
        localStorage.setItem('filterSidebar', this.filterSidebar);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FilterSidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: FilterSidebarComponent, selector: "valtimo-filter-sidebar", ngImport: i0, template: "<!--\n  ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n  ~\n  ~ Licensed under EUPL, Version 1.2 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" basis,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<div>\n  <a\n    class=\"toggle-filter-sidebar\"\n    data-toggle=\"tooltip\"\n    data-trigger=\"hover\"\n    data-placement=\"right\"\n    title=\"Show / hide\"\n    href=\"javascript:void(0)\"\n    (click)=\"toggleFilterSidebar()\"\n    [ngClass]=\"this.filterSidebar === 'show' && 'toggle-expanded'\"\n  >\n    <div class=\"icon-container p-0 bg-transparent\">\n      <i class=\"click-able icon shadow mdi mdi-filter-variant\"></i>\n    </div>\n  </a>\n  <aside class=\"page-aside p-4 mb-4 bg-light filter-holder\" *ngIf=\"this.filterSidebar === 'show'\">\n    <ng-content></ng-content>\n  </aside>\n</div>\n", styles: [".filter-holder{border:0px solid transparent}.toggle-filter-sidebar{position:absolute;top:25px;margin-left:-50px;z-index:1;font-size:2rem;cursor:pointer}.icon-container .icon{background-color:#fff;color:#6b6b6b;line-height:2rem;cursor:pointer}.toggle-filter-sidebar:hover .icon-container .icon{color:#ff5800}@media screen and (min-width: 768px){.toggle-filter-sidebar{margin-left:-25px}.page-aside{position:absolute;left:0;margin-top:0;height:calc(100vh - 61px)}.toggle-expanded{margin-left:255px}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FilterSidebarComponent, decorators: [{
            type: Component,
            args: [{ selector: 'valtimo-filter-sidebar', template: "<!--\n  ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n  ~\n  ~ Licensed under EUPL, Version 1.2 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" basis,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<div>\n  <a\n    class=\"toggle-filter-sidebar\"\n    data-toggle=\"tooltip\"\n    data-trigger=\"hover\"\n    data-placement=\"right\"\n    title=\"Show / hide\"\n    href=\"javascript:void(0)\"\n    (click)=\"toggleFilterSidebar()\"\n    [ngClass]=\"this.filterSidebar === 'show' && 'toggle-expanded'\"\n  >\n    <div class=\"icon-container p-0 bg-transparent\">\n      <i class=\"click-able icon shadow mdi mdi-filter-variant\"></i>\n    </div>\n  </a>\n  <aside class=\"page-aside p-4 mb-4 bg-light filter-holder\" *ngIf=\"this.filterSidebar === 'show'\">\n    <ng-content></ng-content>\n  </aside>\n</div>\n", styles: [".filter-holder{border:0px solid transparent}.toggle-filter-sidebar{position:absolute;top:25px;margin-left:-50px;z-index:1;font-size:2rem;cursor:pointer}.icon-container .icon{background-color:#fff;color:#6b6b6b;line-height:2rem;cursor:pointer}.toggle-filter-sidebar:hover .icon-container .icon{color:#ff5800}@media screen and (min-width: 768px){.toggle-filter-sidebar{margin-left:-25px}.page-aside{position:absolute;left:0;margin-top:0;height:calc(100vh - 61px)}.toggle-expanded{margin-left:255px}}\n"] }]
        }], ctorParameters: () => [] });
//# sourceMappingURL=data:application/json;base64, 