import { ChangeDetectionStrategy, Component, Input, TemplateRef, } from '@angular/core';
import * as i0 from "@angular/core";
const _c0 = function () { return []; };
const _c1 = function (a0) { return { data: a0 }; };
function DropdownLegendComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelement(1, "aui-icon", 3);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    i0.ɵɵnextContext();
    const _r3 = i0.ɵɵreference(4);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("auiTooltip", _r3)("auiTooltipContext", i0.ɵɵpureFunction1(3, _c1, i0.ɵɵpureFunction0(2, _c0)));
} }
function DropdownLegendComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "button", 4);
    i0.ɵɵelement(1, "aui-icon", 5);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵnextContext();
    const _r3 = i0.ɵɵreference(4);
    i0.ɵɵproperty("square", true)("auiTooltip", _r3)("auiTooltipContext", i0.ɵɵpureFunction1(4, _c1, i0.ɵɵpureFunction0(3, _c0)));
} }
function DropdownLegendComponent_ng_template_3_ng_container_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "div", 7);
    i0.ɵɵelementContainer(2, 8);
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r5 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngTemplateOutlet", ctx_r5.legendTemplate);
} }
function DropdownLegendComponent_ng_template_3_ng_template_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtext(0);
    i0.ɵɵpipe(1, "translate");
} if (rf & 2) {
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(1, 1, "no_data"), " ");
} }
function DropdownLegendComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, DropdownLegendComponent_ng_template_3_ng_container_0_Template, 3, 1, "ng-container", 0);
    i0.ɵɵtemplate(1, DropdownLegendComponent_ng_template_3_ng_template_1_Template, 2, 3, "ng-template", null, 6, i0.ɵɵtemplateRefExtractor);
} if (rf & 2) {
    const _r6 = i0.ɵɵreference(2);
    const ctx_r4 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngIf", ctx_r4.data.length && !ctx_r4.noData)("ngIfElse", _r6);
} }
export class DropdownLegendComponent {
}
DropdownLegendComponent.ɵfac = function DropdownLegendComponent_Factory(t) { return new (t || DropdownLegendComponent)(); };
DropdownLegendComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DropdownLegendComponent, selectors: [["acl-dropdown-legend"]], inputs: { data: "data", legendTemplate: "legendTemplate", noData: "noData", isCard: "isCard" }, decls: 5, vars: 2, consts: [[4, "ngIf", "ngIfElse"], ["elseTemplate", ""], ["dropdownItemTemplate", ""], ["icon", "basic:chart_legend", "auiTooltipType", "info", "auiTooltipPosition", "bottom end", "auiTooltipTrigger", "click", "auiTooltipActive", "legendActive", 1, "btn", 3, "auiTooltip", "auiTooltipContext"], ["aui-button", "", "icon", "basic:chart_legend", "auiTooltipType", "info", "auiTooltipPosition", "bottom end", "auiTooltipTrigger", "click", "auiTooltipActive", "legendActive", 1, "btn", 3, "square", "auiTooltip", "auiTooltipContext"], ["icon", "basic:chart_legend"], ["noDataTemplate", ""], [1, "legend-vertical"], [3, "ngTemplateOutlet"]], template: function DropdownLegendComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵtemplate(0, DropdownLegendComponent_ng_container_0_Template, 2, 5, "ng-container", 0);
        i0.ɵɵtemplate(1, DropdownLegendComponent_ng_template_1_Template, 2, 6, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
        i0.ɵɵtemplate(3, DropdownLegendComponent_ng_template_3_Template, 3, 2, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor);
    } if (rf & 2) {
        const _r1 = i0.ɵɵreference(2);
        i0.ɵɵproperty("ngIf", !ctx.isCard)("ngIfElse", _r1);
    } }, styles: [".btn[_ngcontent-%COMP%]{color:rgb(var(--aui-color-n-4));cursor:pointer}  .legend-label{padding:0;margin:0;list-style:none;display:flex;align-items:center;cursor:pointer;justify-content:flex-start}  .legend-label:not(:last-child){margin-bottom:8px}  .label-name{color:rgb(var(--aui-color-secondary-text))}  .label-symbol{margin-right:4px}[_nghost-%COMP%]   .legend-labels[_ngcontent-%COMP%]{padding:0;margin:0;list-style:none;display:flex;flex-direction:column}.legendActive[_ngcontent-%COMP%]{color:rgb(var(--aui-color-primary))}", ".legend-wrap[_ngcontent-%COMP%]{display:inline-block}.legend-wrap[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%], .legend-wrap[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{padding:0;margin:0;list-style:none}.legend-wrap[_ngcontent-%COMP%]   .legend-labels[_ngcontent-%COMP%]{display:flex}.legend-wrap[_ngcontent-%COMP%]   .legend-label[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;justify-content:center}.legend-wrap[_ngcontent-%COMP%]   .legend-label[_ngcontent-%COMP%]:not(:last-child){margin-right:20px}.legend-wrap[_ngcontent-%COMP%]   .forbid[_ngcontent-%COMP%]{cursor:no-drop}.legend-wrap[_ngcontent-%COMP%]   .label-name[_ngcontent-%COMP%]{font-size:12px;color:rgb(var(--aui-color-secondary-text))}.legend-wrap[_ngcontent-%COMP%]   .label-symbol[_ngcontent-%COMP%]{margin-right:4px}.disable[_ngcontent-%COMP%]   .label-symbol[_ngcontent-%COMP%]{background:rgb(var(--aui-color-n-6))!important}.disable[_ngcontent-%COMP%]   .label-name[_ngcontent-%COMP%]{color:rgb(var(--aui-color-n-6))}.hover[_ngcontent-%COMP%]   .label-name[_ngcontent-%COMP%]{color:rgb(var(--aui-color-n-1))}.symbol-square[_ngcontent-%COMP%]{width:12px;height:12px;display:inline-block}.symbol-line[_ngcontent-%COMP%]{width:12px;height:2px;display:inline-block}.symbol-circle[_ngcontent-%COMP%]{width:12px;height:12px;border-radius:50%;display:inline-block}.operation[_ngcontent-%COMP%]{display:flex;justify-content:center}.select-all[_ngcontent-%COMP%]     .aui-checkbox{font-size:12px;line-height:16px;margin-bottom:8px}"], changeDetection: 0 });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DropdownLegendComponent, [{
        type: Component,
        args: [{ selector: 'acl-dropdown-legend', template: `
    <ng-container *ngIf="!isCard; else elseTemplate">
      <aui-icon
        class="btn"
        icon="basic:chart_legend"
        [auiTooltip]="dropdownItemTemplate"
        [auiTooltipContext]="{ data: [] }"
        auiTooltipType="info"
        auiTooltipPosition="bottom end"
        auiTooltipTrigger="click"
        auiTooltipActive="legendActive"
      ></aui-icon>
    </ng-container>
    <ng-template #elseTemplate>
      <button
        aui-button
        [square]="true"
        class="btn"
        icon="basic:chart_legend"
        [auiTooltip]="dropdownItemTemplate"
        [auiTooltipContext]="{ data: [] }"
        auiTooltipType="info"
        auiTooltipPosition="bottom end"
        auiTooltipTrigger="click"
        auiTooltipActive="legendActive"
      >
        <aui-icon icon="basic:chart_legend"></aui-icon>
      </button>
    </ng-template>

    <ng-template #dropdownItemTemplate>
      <ng-container *ngIf="data.length && !noData; else noDataTemplate">
        <div class="legend-vertical">
          <ng-container [ngTemplateOutlet]="legendTemplate"></ng-container>
        </div>
      </ng-container>
      <ng-template #noDataTemplate>
        {{ 'no_data' | translate }}
      </ng-template>
    </ng-template>
  `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".btn{color:rgb(var(--aui-color-n-4));cursor:pointer}::ng-deep .legend-label{padding:0;margin:0;list-style:none;display:flex;align-items:center;cursor:pointer;justify-content:flex-start}::ng-deep .legend-label:not(:last-child){margin-bottom:8px}::ng-deep .label-name{color:rgb(var(--aui-color-secondary-text))}::ng-deep .label-symbol{margin-right:4px}:host .legend-labels{padding:0;margin:0;list-style:none;display:flex;flex-direction:column}.legendActive{color:rgb(var(--aui-color-primary))}\n", ".legend-wrap{display:inline-block}.legend-wrap ul,.legend-wrap li{padding:0;margin:0;list-style:none}.legend-wrap .legend-labels{display:flex}.legend-wrap .legend-label{display:flex;align-items:center;cursor:pointer;justify-content:center}.legend-wrap .legend-label:not(:last-child){margin-right:20px}.legend-wrap .forbid{cursor:no-drop}.legend-wrap .label-name{font-size:12px;color:rgb(var(--aui-color-secondary-text))}.legend-wrap .label-symbol{margin-right:4px}.disable .label-symbol{background:rgb(var(--aui-color-n-6))!important}.disable .label-name{color:rgb(var(--aui-color-n-6))}.hover .label-name{color:rgb(var(--aui-color-n-1))}.symbol-square{width:12px;height:12px;display:inline-block}.symbol-line{width:12px;height:2px;display:inline-block}.symbol-circle{width:12px;height:12px;border-radius:50%;display:inline-block}.operation{display:flex;justify-content:center}.select-all ::ng-deep .aui-checkbox{font-size:12px;line-height:16px;margin-bottom:8px}\n"] }]
    }], null, { data: [{
            type: Input
        }], legendTemplate: [{
            type: Input
        }], noData: [{
            type: Input
        }], isCard: [{
            type: Input
        }] }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHJvcGRvd24tbGVnZW5kLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21tb24vc3JjL2NoYXJ0L2N1c3RvbS10ZW1wbGF0ZS9kcm9wZG93bi1sZWdlbmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLHVCQUF1QixFQUN2QixTQUFTLEVBQ1QsS0FBSyxFQUNMLFdBQVcsR0FDWixNQUFNLGVBQWUsQ0FBQzs7Ozs7SUFPbkIsNkJBQWlEO0lBQy9DLDhCQVNZO0lBQ2QsMEJBQWU7Ozs7SUFQWCxlQUFtQztJQUFuQyxnQ0FBbUMsNkVBQUE7OztJQVNyQyxpQ0FXQztJQUNDLDhCQUErQztJQUNqRCxpQkFBUz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