/*
 * 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, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "carbon-components-angular";
import * as i3 from "@ngx-translate/core";
import * as i4 from "../../pipes/menu-item-translation.pipe";
export class MenuItemTextComponent {
    constructor() {
        this.accent = false;
        this.showOverFlowMenu = false;
        this.overflowMenuClosed = new EventEmitter();
        this.openInNewTab = new EventEmitter();
    }
    onOpenChange(open) {
        if (!open) {
            this.overflowMenuClosed.emit();
        }
    }
    onSelectOpenInNewTab() {
        this.openInNewTab.emit();
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MenuItemTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: MenuItemTextComponent, selector: "valtimo-menu-item-text", inputs: { menuItem: "menuItem", accent: "accent", showOverFlowMenu: "showOverFlowMenu" }, outputs: { overflowMenuClosed: "overflowMenuClosed", openInNewTab: "openInNewTab" }, 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  *ngIf=\"{titleTranslation: menuItem | menuItemTranslate | async} as obs\"\n  class=\"menu-item-text-container\"\n  id=\"{{ menuItem?.id }}\"\n>\n  <span *ngIf=\"obs.titleTranslation\" [ngClass]=\"{'cds--link empty-menu-icon-text': accent}\">\n    <div class=\"menu-item-icon-container\">\n      <i class=\"{{ menuItem.iconClass }}\"></i>\n    </div>\n\n    {{ obs.titleTranslation + (accent ? ' >' : '') }}\n  </span>\n\n  <ng-container *ngTemplateOutlet=\"overflowTrigger\"></ng-container>\n\n  <cds-overflow-menu\n    [customTrigger]=\"overflowTrigger\"\n    [open]=\"showOverFlowMenu\"\n    [offset]=\"{x: 100, y: -25}\"\n    placement=\"bottom\"\n    wrapperClass=\"--hide-after --wide\"\n    (openChange)=\"onOpenChange($event)\"\n  >\n    <cds-overflow-menu-option (selected)=\"onSelectOpenInNewTab()\">{{\n      'interface.openInNewTab' | translate\n    }}</cds-overflow-menu-option>\n  </cds-overflow-menu>\n</div>\n\n<ng-template #overflowTrigger>\n  <div></div>\n</ng-template>\n", styles: [".menu-item-text-container .menu-item-icon-container{position:absolute;margin-left:-.75rem;transform:translate(-100%)}.menu-item-text-container .empty-menu-icon-text{font-weight:600!important}.menu-item-text-container .cds--overflow-menu{visibility:hidden;height:0;width:0;position:absolute}\n/*!\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"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.OverflowMenu, selector: "cds-overflow-menu, ibm-overflow-menu", inputs: ["buttonLabel", "flip", "placement", "open", "customTrigger", "offset", "wrapperClass", "triggerClass"], outputs: ["openChange"] }, { kind: "component", type: i2.OverflowMenuOption, selector: "cds-overflow-menu-option, ibm-overflow-menu-option", inputs: ["divider", "type", "disabled", "href", "target", "innerClass"], outputs: ["selected"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "pipe", type: i4.MenuItemTranslationPipe, name: "menuItemTranslate" }], encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MenuItemTextComponent, decorators: [{
            type: Component,
            args: [{ selector: 'valtimo-menu-item-text', encapsulation: ViewEncapsulation.None, 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  *ngIf=\"{titleTranslation: menuItem | menuItemTranslate | async} as obs\"\n  class=\"menu-item-text-container\"\n  id=\"{{ menuItem?.id }}\"\n>\n  <span *ngIf=\"obs.titleTranslation\" [ngClass]=\"{'cds--link empty-menu-icon-text': accent}\">\n    <div class=\"menu-item-icon-container\">\n      <i class=\"{{ menuItem.iconClass }}\"></i>\n    </div>\n\n    {{ obs.titleTranslation + (accent ? ' >' : '') }}\n  </span>\n\n  <ng-container *ngTemplateOutlet=\"overflowTrigger\"></ng-container>\n\n  <cds-overflow-menu\n    [customTrigger]=\"overflowTrigger\"\n    [open]=\"showOverFlowMenu\"\n    [offset]=\"{x: 100, y: -25}\"\n    placement=\"bottom\"\n    wrapperClass=\"--hide-after --wide\"\n    (openChange)=\"onOpenChange($event)\"\n  >\n    <cds-overflow-menu-option (selected)=\"onSelectOpenInNewTab()\">{{\n      'interface.openInNewTab' | translate\n    }}</cds-overflow-menu-option>\n  </cds-overflow-menu>\n</div>\n\n<ng-template #overflowTrigger>\n  <div></div>\n</ng-template>\n", styles: [".menu-item-text-container .menu-item-icon-container{position:absolute;margin-left:-.75rem;transform:translate(-100%)}.menu-item-text-container .empty-menu-icon-text{font-weight:600!important}.menu-item-text-container .cds--overflow-menu{visibility:hidden;height:0;width:0;position:absolute}\n/*!\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"] }]
        }], propDecorators: { menuItem: [{
                type: Input
            }], accent: [{
                type: Input
            }], showOverFlowMenu: [{
                type: Input
            }], overflowMenuClosed: [{
                type: Output
            }], openInNewTab: [{
                type: Output
            }] } });
//# sourceMappingURL=data:application/json;base64, 