import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@ironsource/fusion-ui/components/checkbox/v2";
import * as i3 from "@ironsource/fusion-ui/components/icon/v1";
import * as i4 from "@ironsource/fusion-ui/components/flag/v1";
import * as i5 from "@ironsource/fusion-ui/components/tooltip/v2";
import * as i6 from "@ironsource/fusion-ui/components/dynamic-components/v1";
const _c0 = a0 => ({ item: a0 });
function DropdownDualMultiSelectBodyItemComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
    const _r10 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "label", 5)(1, "fusion-checkbox", 6);
    i0.ɵɵlistener("changed", function DropdownDualMultiSelectBodyItemComponent_ng_template_1_Template_fusion_checkbox_changed_1_listener() { const restoredCtx = i0.ɵɵrestoreView(_r10); const item_r8 = restoredCtx.item; const ctx_r9 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r9.changeSelectedItem(item_r8)); });
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainer(2, 0);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r8 = ctx.item;
    const ctx_r0 = i0.ɵɵnextContext();
    const _r5 = i0.ɵɵreference(6);
    const _r7 = i0.ɵɵreference(8);
    i0.ɵɵproperty("for", item_r8.id);
    i0.ɵɵadvance();
    i0.ɵɵproperty("id", item_r8.id)("isDisabled", ctx_r0.isDisabled)("checked", ctx_r0.isSelectedItem);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngTemplateOutlet", (item_r8 == null ? null : item_r8.content) ? _r5 : _r7)("ngTemplateOutletContext", i0.ɵɵpureFunction1(6, _c0, item_r8));
} }
const _c1 = () => ({ iconName: "close", iconVersion: "v2" });
function DropdownDualMultiSelectBodyItemComponent_ng_template_3_fusion_icon_2_Template(rf, ctx) { if (rf & 1) {
    const _r15 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "fusion-icon", 9);
    i0.ɵɵlistener("click", function DropdownDualMultiSelectBodyItemComponent_ng_template_3_fusion_icon_2_Template_fusion_icon_click_0_listener() { i0.ɵɵrestoreView(_r15); const item_r11 = i0.ɵɵnextContext().item; const ctx_r13 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r13.clearSelectItem(item_r11)); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵproperty("name", i0.ɵɵpureFunction0(1, _c1));
} }
function DropdownDualMultiSelectBodyItemComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "label", 7);
    i0.ɵɵelementContainer(1, 0);
    i0.ɵɵtemplate(2, DropdownDualMultiSelectBodyItemComponent_ng_template_3_fusion_icon_2_Template, 1, 2, "fusion-icon", 8);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r11 = ctx.item;
    const ctx_r2 = i0.ɵɵnextContext();
    const _r5 = i0.ɵɵreference(6);
    const _r7 = i0.ɵɵreference(8);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngTemplateOutlet", (item_r11 == null ? null : item_r11.content) ? _r5 : _r7)("ngTemplateOutletContext", i0.ɵɵpureFunction1(3, _c0, item_r11));
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", !ctx_r2.isDisabled);
} }
function DropdownDualMultiSelectBodyItemComponent_ng_template_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 10);
    i0.ɵɵelement(1, "fusion-dynamic-components", 11);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r16 = ctx.item;
    i0.ɵɵadvance();
    i0.ɵɵproperty("configuration", item_r16 == null ? null : item_r16.content);
} }
function DropdownDualMultiSelectBodyItemComponent_ng_template_7_img_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "img", 16);
} if (rf & 2) {
    const item_r17 = i0.ɵɵnextContext().item;
    i0.ɵɵproperty("src", item_r17.image, i0.ɵɵsanitizeUrl);
} }
function DropdownDualMultiSelectBodyItemComponent_ng_template_7_fusion_flag_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "fusion-flag", 17);
} if (rf & 2) {
    const item_r17 = i0.ɵɵnextContext().item;
    i0.ɵɵproperty("name", item_r17.flag);
} }
function DropdownDualMultiSelectBodyItemComponent_ng_template_7_fusion_icon_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "fusion-icon", 18);
} if (rf & 2) {
    const item_r17 = i0.ɵɵnextContext().item;
    i0.ɵɵproperty("name", item_r17.icon);
} }
function DropdownDualMultiSelectBodyItemComponent_ng_template_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, DropdownDualMultiSelectBodyItemComponent_ng_template_7_img_0_Template, 1, 1, "img", 12)(1, DropdownDualMultiSelectBodyItemComponent_ng_template_7_fusion_flag_1_Template, 1, 1, "fusion-flag", 13)(2, DropdownDualMultiSelectBodyItemComponent_ng_template_7_fusion_icon_2_Template, 1, 1, "fusion-icon", 14);
    i0.ɵɵelementStart(3, "span", 15);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r17 = ctx.item;
    i0.ɵɵproperty("ngIf", item_r17.image);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", item_r17.flag);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", item_r17.icon);
    i0.ɵɵadvance();
    i0.ɵɵpropertyInterpolate("fusionTooltip", item_r17.title || item_r17.displayText);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(item_r17.title || item_r17.displayText);
} }
export class DropdownDualMultiSelectBodyItemComponent {
    constructor() {
        this.changeSelected = new EventEmitter();
        this.clearSelect = new EventEmitter();
    }
    changeSelectedItem(item) {
        this.changeSelected.emit(item);
    }
    clearSelectItem(item) {
        if (!item.isDisabled) {
            this.clearSelect.emit(item);
        }
    }
    static { this.ɵfac = function DropdownDualMultiSelectBodyItemComponent_Factory(t) { return new (t || DropdownDualMultiSelectBodyItemComponent)(); }; }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DropdownDualMultiSelectBodyItemComponent, selectors: [["fusion-dropdown-dual-multi-select-body-item"]], inputs: { bodySide: "bodySide", item: "item", isDisabled: "isDisabled", isSelectedItem: "isSelectedItem" }, outputs: { changeSelected: "changeSelected", clearSelect: "clearSelect" }, decls: 9, vars: 4, consts: [[3, "ngTemplateOutlet", "ngTemplateOutletContext"], ["leftSide", ""], ["rightSide", ""], ["dynamicItem", ""], ["optionTemplate", ""], [1, "is-option-label", "left-side", 3, "for"], [1, "item-check", 3, "id", "isDisabled", "checked", "changed"], [1, "is-option-label", "right-side"], ["class", "icon-clear", 3, "name", "click", 4, "ngIf"], [1, "icon-clear", 3, "name", "click"], [1, "dynamic-item"], [3, "configuration"], ["alt", "item-image", 3, "src", 4, "ngIf"], [3, "name", 4, "ngIf"], ["class", "icon", 3, "name", 4, "ngIf"], [1, "fu-option-title", "truncate", 3, "fusionTooltip"], ["alt", "item-image", 3, "src"], [3, "name"], [1, "icon", 3, "name"]], template: function DropdownDualMultiSelectBodyItemComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementContainer(0, 0);
            i0.ɵɵtemplate(1, DropdownDualMultiSelectBodyItemComponent_ng_template_1_Template, 3, 8, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor)(3, DropdownDualMultiSelectBodyItemComponent_ng_template_3_Template, 3, 5, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor)(5, DropdownDualMultiSelectBodyItemComponent_ng_template_5_Template, 2, 1, "ng-template", null, 3, i0.ɵɵtemplateRefExtractor)(7, DropdownDualMultiSelectBodyItemComponent_ng_template_7_Template, 5, 5, "ng-template", null, 4, i0.ɵɵtemplateRefExtractor);
        } if (rf & 2) {
            const _r1 = i0.ɵɵreference(2);
            const _r3 = i0.ɵɵreference(4);
            i0.ɵɵproperty("ngTemplateOutlet", ctx.bodySide === "left" ? _r1 : _r3)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c0, ctx.item));
        } }, dependencies: [i1.NgIf, i1.NgTemplateOutlet, i2.CheckboxComponent, i3.IconComponent, i4.FlagComponent, i5.TooltipDirective, i6.DynamicComponentsComponent], styles: [".options-data-list[_nghost-%COMP%]   .is-option-label.right-side[_ngcontent-%COMP%], .options-data-list   [_nghost-%COMP%]   .is-option-label.right-side[_ngcontent-%COMP%], .options-data-list[_nghost-%COMP%]   .is-option-label.left-side[_ngcontent-%COMP%], .options-data-list   [_nghost-%COMP%]   .is-option-label.left-side[_ngcontent-%COMP%]{font-size:12px;font-family:var(--body-font-family, \"HelveticaNeue\");font-weight:400}.options-data-list[_nghost-%COMP%]   *[_ngcontent-%COMP%], .options-data-list   [_nghost-%COMP%]   *[_ngcontent-%COMP%]{box-sizing:border-box}.options-data-list[_nghost-%COMP%]   .is-option-label.right-side[_ngcontent-%COMP%]:hover, .options-data-list   [_nghost-%COMP%]   .is-option-label.right-side[_ngcontent-%COMP%]:hover, .options-data-list[_nghost-%COMP%]   .is-option-label.left-side[_ngcontent-%COMP%]:hover, .options-data-list   [_nghost-%COMP%]   .is-option-label.left-side[_ngcontent-%COMP%]:hover{border-radius:5px;background-color:#f7f8f9}.options-data-list[_nghost-%COMP%]   .is-option-label.right-side[_ngcontent-%COMP%]   .fu-option-title.truncate[_ngcontent-%COMP%], .options-data-list   [_nghost-%COMP%]   .is-option-label.right-side[_ngcontent-%COMP%]   .fu-option-title.truncate[_ngcontent-%COMP%], .options-data-list[_nghost-%COMP%]   .is-option-label.left-side[_ngcontent-%COMP%]   .fu-option-title.truncate[_ngcontent-%COMP%], .options-data-list   [_nghost-%COMP%]   .is-option-label.left-side[_ngcontent-%COMP%]   .fu-option-title.truncate[_ngcontent-%COMP%]{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.options-data-list[_nghost-%COMP%]   .is-option-label[_ngcontent-%COMP%], .options-data-list   [_nghost-%COMP%]   .is-option-label[_ngcontent-%COMP%]{position:relative}.options-data-list[_nghost-%COMP%]   .is-option-label[_ngcontent-%COMP%]   img[_ngcontent-%COMP%], .options-data-list   [_nghost-%COMP%]   .is-option-label[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:20px;height:20px;max-width:20px;border-radius:4px;vertical-align:middle;margin-right:1px;margin-top:-2px}.options-data-list[_nghost-%COMP%]   .is-option-label[_ngcontent-%COMP%]   fusion-icon.icon[_ngcontent-%COMP%], .options-data-list   [_nghost-%COMP%]   .is-option-label[_ngcontent-%COMP%]   fusion-icon.icon[_ngcontent-%COMP%]{margin-right:1px;padding:2px 2px 2px 3px;vertical-align:sub;display:inline-block}.options-data-list[_nghost-%COMP%]   .is-option-label[_ngcontent-%COMP%]   fusion-icon.icon[_ngcontent-%COMP%]     svg, .options-data-list   [_nghost-%COMP%]   .is-option-label[_ngcontent-%COMP%]   fusion-icon.icon[_ngcontent-%COMP%]     svg{width:12px;height:12px}.options-data-list[_nghost-%COMP%]   .is-option-label[_ngcontent-%COMP%]   fusion-icon.icon[_ngcontent-%COMP%]     svg *, .options-data-list   [_nghost-%COMP%]   .is-option-label[_ngcontent-%COMP%]   fusion-icon.icon[_ngcontent-%COMP%]     svg *{fill:var(--light-color-700, #95A6B8)}.options-data-list[_nghost-%COMP%]   .is-option-label[_ngcontent-%COMP%]   fusion-flag[_ngcontent-%COMP%], .options-data-list   [_nghost-%COMP%]   .is-option-label[_ngcontent-%COMP%]   fusion-flag[_ngcontent-%COMP%]{margin-right:4px}.options-data-list[_nghost-%COMP%]   .is-option-label[_ngcontent-%COMP%]   .dynamic-item[_ngcontent-%COMP%], .options-data-list   [_nghost-%COMP%]   .is-option-label[_ngcontent-%COMP%]   .dynamic-item[_ngcontent-%COMP%]{display:inline-block}.options-data-list[_nghost-%COMP%]   .is-option-label.left-side[_ngcontent-%COMP%], .options-data-list   [_nghost-%COMP%]   .is-option-label.left-side[_ngcontent-%COMP%]{padding:4px 4px 5px 5px;cursor:pointer;display:flex;justify-content:flex-start;align-items:center;width:249px;height:32px;margin-left:6px;margin-top:2px}.options-data-list[_nghost-%COMP%]   .is-option-label.left-side[_ngcontent-%COMP%]   .fu-option-title.truncate[_ngcontent-%COMP%], .options-data-list   [_nghost-%COMP%]   .is-option-label.left-side[_ngcontent-%COMP%]   .fu-option-title.truncate[_ngcontent-%COMP%]{width:190px}.options-data-list[_nghost-%COMP%]   .is-option-label.left-side[_ngcontent-%COMP%]   .item-check[_ngcontent-%COMP%], .options-data-list   [_nghost-%COMP%]   .is-option-label.left-side[_ngcontent-%COMP%]   .item-check[_ngcontent-%COMP%]{margin-right:8px;line-height:0}.options-data-list[_nghost-%COMP%]   .is-option-label.right-side[_ngcontent-%COMP%], .options-data-list   [_nghost-%COMP%]   .is-option-label.right-side[_ngcontent-%COMP%]{padding:4px 4px 5px 6px;cursor:pointer;display:flex;width:249px;height:32px;justify-content:flex-start;align-items:center;margin-left:3px;margin-top:2px}.options-data-list[_nghost-%COMP%]   .is-option-label.right-side[_ngcontent-%COMP%]   fusion-icon.icon-clear[_ngcontent-%COMP%]     svg, .options-data-list   [_nghost-%COMP%]   .is-option-label.right-side[_ngcontent-%COMP%]   fusion-icon.icon-clear[_ngcontent-%COMP%]     svg{width:12px;height:12px}.options-data-list[_nghost-%COMP%]   .is-option-label.right-side[_ngcontent-%COMP%]   fusion-icon.icon-clear[_ngcontent-%COMP%]     svg *, .options-data-list   [_nghost-%COMP%]   .is-option-label.right-side[_ngcontent-%COMP%]   fusion-icon.icon-clear[_ngcontent-%COMP%]     svg *{fill:var(--light-color-700, #95A6B8)}.options-data-list[_nghost-%COMP%]   .is-option-label.right-side[_ngcontent-%COMP%]   .fu-option-title[_ngcontent-%COMP%], .options-data-list   [_nghost-%COMP%]   .is-option-label.right-side[_ngcontent-%COMP%]   .fu-option-title[_ngcontent-%COMP%]{line-height:20px}.options-data-list[_nghost-%COMP%]   .is-option-label.right-side[_ngcontent-%COMP%]   .fu-option-title.truncate[_ngcontent-%COMP%], .options-data-list   [_nghost-%COMP%]   .is-option-label.right-side[_ngcontent-%COMP%]   .fu-option-title.truncate[_ngcontent-%COMP%]{width:190px}.options-data-list[_nghost-%COMP%]   .is-option-label.right-side[_ngcontent-%COMP%]   fusion-icon.icon-clear[_ngcontent-%COMP%], .options-data-list   [_nghost-%COMP%]   .is-option-label.right-side[_ngcontent-%COMP%]   fusion-icon.icon-clear[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;position:absolute;height:16px;width:16px;right:0;padding-right:4px}"], changeDetection: 0 }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DropdownDualMultiSelectBodyItemComponent, [{
        type: Component,
        args: [{ selector: 'fusion-dropdown-dual-multi-select-body-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngTemplateOutlet]=\"bodySide === 'left' ? leftSide : rightSide\" [ngTemplateOutletContext]=\"{item: item}\"></ng-container>\n\n\n<ng-template #leftSide let-item=\"item\">\n    <label\n        [for]=\"item.id\"\n        class=\"is-option-label left-side\">\n        <fusion-checkbox\n            class=\"item-check\"\n            [id]=\"item.id\"\n            [isDisabled]=\"isDisabled\"\n            [checked]=\"isSelectedItem\"\n            (changed)=\"changeSelectedItem(item)\"\n        ></fusion-checkbox>\n        <ng-container [ngTemplateOutlet]=\"item?.content ? dynamicItem : optionTemplate\" [ngTemplateOutletContext]=\"{item: item}\">\n        </ng-container>\n    </label>\n</ng-template>\n\n\n<ng-template #rightSide let-item=\"item\" >\n    <label class=\"is-option-label right-side\">\n        <ng-container [ngTemplateOutlet]=\"item?.content ? dynamicItem : optionTemplate\" [ngTemplateOutletContext]=\"{item: item}\"></ng-container>\n        <fusion-icon *ngIf=\"!isDisabled\" (click)=\"clearSelectItem(item)\" class=\"icon-clear\" [name]=\"{iconName: 'close', iconVersion: 'v2'}\"></fusion-icon>\n    </label>\n</ng-template>\n\n\n<ng-template #dynamicItem let-item=\"item\">\n    <span class=\"dynamic-item\">\n        <fusion-dynamic-components [configuration]=\"item?.content\"></fusion-dynamic-components>\n    </span>\n</ng-template>\n\n\n<ng-template #optionTemplate let-item=\"item\">\n    <img [src]=\"item.image\" *ngIf=\"item.image\" alt=\"item-image\" />\n    <fusion-flag *ngIf=\"item.flag\" [name]=\"item.flag\"></fusion-flag>\n    <fusion-icon *ngIf=\"item.icon\" [name]=\"item.icon\" class=\"icon\"></fusion-icon>\n    <span class=\"fu-option-title truncate\" fusionTooltip=\"{{item.title || item.displayText}}\">{{item.title || item.displayText}}</span>\n</ng-template>\n", styles: [":host-context(.options-data-list) .is-option-label.right-side,:host-context(.options-data-list) .is-option-label.left-side{font-size:12px;font-family:var(--body-font-family, \"HelveticaNeue\");font-weight:400}:host-context(.options-data-list) *{box-sizing:border-box}:host-context(.options-data-list) .is-option-label.right-side:hover,:host-context(.options-data-list) .is-option-label.left-side:hover{border-radius:5px;background-color:#f7f8f9}:host-context(.options-data-list) .is-option-label.right-side .fu-option-title.truncate,:host-context(.options-data-list) .is-option-label.left-side .fu-option-title.truncate{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host-context(.options-data-list) .is-option-label{position:relative}:host-context(.options-data-list) .is-option-label img{width:20px;height:20px;max-width:20px;border-radius:4px;vertical-align:middle;margin-right:1px;margin-top:-2px}:host-context(.options-data-list) .is-option-label fusion-icon.icon{margin-right:1px;padding:2px 2px 2px 3px;vertical-align:sub;display:inline-block}:host-context(.options-data-list) .is-option-label fusion-icon.icon ::ng-deep svg{width:12px;height:12px}:host-context(.options-data-list) .is-option-label fusion-icon.icon ::ng-deep svg *{fill:var(--light-color-700, #95A6B8)}:host-context(.options-data-list) .is-option-label fusion-flag{margin-right:4px}:host-context(.options-data-list) .is-option-label .dynamic-item{display:inline-block}:host-context(.options-data-list) .is-option-label.left-side{padding:4px 4px 5px 5px;cursor:pointer;display:flex;justify-content:flex-start;align-items:center;width:249px;height:32px;margin-left:6px;margin-top:2px}:host-context(.options-data-list) .is-option-label.left-side .fu-option-title.truncate{width:190px}:host-context(.options-data-list) .is-option-label.left-side .item-check{margin-right:8px;line-height:0}:host-context(.options-data-list) .is-option-label.right-side{padding:4px 4px 5px 6px;cursor:pointer;display:flex;width:249px;height:32px;justify-content:flex-start;align-items:center;margin-left:3px;margin-top:2px}:host-context(.options-data-list) .is-option-label.right-side fusion-icon.icon-clear ::ng-deep svg{width:12px;height:12px}:host-context(.options-data-list) .is-option-label.right-side fusion-icon.icon-clear ::ng-deep svg *{fill:var(--light-color-700, #95A6B8)}:host-context(.options-data-list) .is-option-label.right-side .fu-option-title{line-height:20px}:host-context(.options-data-list) .is-option-label.right-side .fu-option-title.truncate{width:190px}:host-context(.options-data-list) .is-option-label.right-side fusion-icon.icon-clear{display:flex;justify-content:center;align-items:center;position:absolute;height:16px;width:16px;right:0;padding-right:4px}\n"] }]
    }], () => [], { bodySide: [{
            type: Input
        }], item: [{
            type: Input
        }], isDisabled: [{
            type: Input
        }], isSelectedItem: [{
            type: Input
        }], changeSelected: [{
            type: Output
        }], clearSelect: [{
            type: Output
        }] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DropdownDualMultiSelectBodyItemComponent, { className: "DropdownDualMultiSelectBodyItemComponent", filePath: "components/dropdown-dual-multi-select-body/dropdown-dual-multi-select-body-item/dropdown-dual-multi-select-body-item.component.ts", lineNumber: 10 }); })();
//# sourceMappingURL=data:application/json;base64, 