import { NgTemplateOutlet } from '@angular/common';
import { HttpErrorResponse } from '@angular/common/http';
import { ChangeDetectionStrategy, Component, Inject, Injector, ViewEncapsulation } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
import { Subscription } from 'rxjs';
import { AppConfig } from '../../../../../config/app-config';
import { DragDropModule, moveItemInArray } from '@angular/cdk/drag-drop';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatButtonToggleModule } from '@angular/material/button-toggle';
import { MatDialogModule } from '@angular/material/dialog';
import { MatExpansionModule } from '@angular/material/expansion';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatIconModule } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input';
import { MatListModule } from '@angular/material/list';
import { MatMenuModule } from '@angular/material/menu';
import { MatRadioModule } from '@angular/material/radio';
import { OTranslatePipe } from '../../../../../pipes/o-translate.pipe';
import { OntimizeExportServiceProvider } from '../../../../../services/factories';
import { OntimizeExportService } from '../../../../../services/ontimize/ontimize-export.service';
import { SnackBarService } from '../../../../../services/snackbar.service';
import { OTranslateService } from '../../../../../services/translate/o-translate.service';
import { Codes } from '../../../../../util/codes';
import { Util } from '../../../../../util/util';
import { OTableExportButtonService } from '../../export-button/o-table-export-button.service';
import { OTableExportConfiguration } from '../../header/table-menu/o-table-export-configuration.class';
import * as i0 from "@angular/core";
import * as i1 from "@angular/material/dialog";
import * as i2 from "@angular/forms";
import * as i3 from "@angular/cdk/drag-drop";
import * as i4 from "@angular/material/button";
import * as i5 from "@angular/material/button-toggle";
import * as i6 from "@angular/material/expansion";
import * as i7 from "@angular/material/form-field";
import * as i8 from "@angular/material/icon";
import * as i9 from "@angular/material/input";
import * as i10 from "@angular/material/list";
import * as i11 from "@angular/material/radio";
import * as i12 from "../../header/table-menu/o-table-export-configuration.class";
export class OTableExportDialogComponent {
    constructor(dialogRef, injector, config) {
        this.dialogRef = dialogRef;
        this.injector = injector;
        this.config = config;
        this.subscription = new Subscription();
        this.orientations = [{ text: "EXPORT.DIALOG.VERTICAL", value: true }, { text: "EXPORT.DIALOG.HORIZONTAL", value: false }];
        this.exportTypes = [{
                exportType: 'xlsx',
                svgIcon: 'ontimize:EXCEL',
                olabel: 'TABLE.BUTTONS.EXCEL',
                className: 'excel-button'
            }, {
                exportType: 'html',
                svgIcon: 'ontimize:HTML',
                olabel: 'TABLE.BUTTONS.HTML',
                className: 'html-button'
            }, {
                exportType: 'pdf',
                svgIcon: 'ontimize:PDF',
                olabel: 'TABLE.BUTTONS.PDF',
                className: 'pdf-button'
            }, {
                exportType: 'csv',
                svgIcon: 'ontimize:CSV',
                olabel: 'TABLE.BUTTONS.CSV',
                className: 'csv-button'
            }];
        this.vertical = true;
        this.filename = '';
        this.isExpanded = false;
        this.snackBarService = injector.get(SnackBarService);
        this.translateService = this.injector.get(OTranslateService);
        this.oTableExportButtonService = this.injector.get(OTableExportButtonService);
        this.appConfig = this.injector.get(AppConfig);
        this.selectedExportFormat = this.getDefaultSelection();
        if (config && Util.isDefined(config.visibleButtons)) {
            this.visibleButtons = Util.parseArray(config.visibleButtons.toLowerCase(), true);
        }
    }
    ngOnInit() {
        this.initialize();
    }
    ngOnDestroy() {
        this.subscription.unsubscribe();
    }
    initialize() {
        this.columnsData = this.config.columns;
        this.columns = [...this.columnsData];
        this.configureService();
    }
    configureService() {
        let loadingService = OntimizeExportService;
        if (this.config.serviceType) {
            loadingService = this.config.serviceType;
        }
        this.exportService = this.injector.get(loadingService);
        const serviceCfg = this.exportService.getDefaultServiceConfiguration(this.config.service);
        this.exportService.configureService(serviceCfg);
    }
    updateColumnsSort() {
        this.columns.sort((a, b) => {
            let indexA = this.columnsData.findIndex(x => x === a);
            let indexB = this.columnsData.findIndex(x => x === b);
            return indexA - indexB;
        });
    }
    dropColumns(event) {
        moveItemInArray(this.columnsData, event.previousIndex, event.currentIndex);
        this.updateColumnsSort();
    }
    columnsCompareFunction(co1, co2) {
        return co1.id === co2.id;
    }
    export() {
        this.dialogRef.close(true);
        const exportFunction = this.getCustomExportButton(this.selectedExportFormat)?.exportFunction;
        if (exportFunction) {
            exportFunction(this.columns, !this.vertical, this.filename);
            return;
        }
        const onClickEvent = this.getCustomExportButton(this.selectedExportFormat)?.onClick;
        if (onClickEvent?.observers?.length > 0) {
            console.warn('⚠️ [DEPRECATED] The onClick event is deprecated. Use the input export-function instead.');
            this.getCustomExportButton(this.selectedExportFormat)?.onClick.emit();
            return;
        }
        this.exportService.exportData(this.selectedExportFormat, this.columns, !this.vertical, this.filename).subscribe({
            next: () => {
                this.snackBarService.open('MESSAGES.SUCCESS_EXPORT_TABLE_DATA', { icon: 'check_circle' });
            },
            error: (err) => {
                this.handleError(err);
            }
        });
    }
    isButtonVisible(btn) {
        const useExportConfiguration3X = this.appConfig.useExportConfiguration();
        let isVisible = true;
        if (this.visibleButtons) {
            isVisible = this.visibleButtons.indexOf(btn) !== -1;
        }
        else {
            if (useExportConfiguration3X) {
                isVisible = Codes.VISIBLE_EXPORT_BUTTONS3X.indexOf(btn) !== -1;
            }
            else {
                isVisible = Codes.VISIBLE_EXPORT_BUTTONS.indexOf(btn) !== -1;
            }
        }
        return isVisible;
    }
    getDefaultSelection() {
        const useExportConfiguration3X = this.appConfig.useExportConfiguration();
        if (useExportConfiguration3X) {
            return Codes.VISIBLE_EXPORT_BUTTONS3X[0];
        }
        else {
            return Codes.VISIBLE_EXPORT_BUTTONS[0];
        }
    }
    handleError(err) {
        if (err instanceof HttpErrorResponse) {
            this.snackBarService.open(err.message, { icon: 'error' });
        }
        else {
            this.snackBarService.open('MESSAGES.ERROR_EXPORT_TABLE_DATA', { icon: 'error' });
        }
    }
    onChangeMatButtonToggleGroup(event) {
        event.source.buttonToggleGroup.value = event.value;
        this.selectedExportFormat = event.value;
    }
    getCustomExportButton(type) {
        return this.config.options.find(x => x.exportType === type);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: OTableExportDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: i0.Injector }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: OTableExportDialogComponent, isStandalone: true, selector: "o-table-export-dialog", host: { classAttribute: "o-table-export-dialog" }, providers: [
            OntimizeExportServiceProvider
        ], ngImport: i0, template: "<span mat-dialog-title>{{ 'TABLE.BUTTONS.EXPORT' | oTranslate }}</span>\n<mat-dialog-content class=\"dialog_content\">\n  <div mat-subheader>{{ 'TABLE.DIALOG.EXPORT.DESCRIPTION' | oTranslate }}</div>\n  <mat-button-toggle-group class=\"type_toggle_group\" #group=\"matButtonToggleGroup\" [(ngModel)]=\"selectedExportFormat\">\n    @for (button of exportTypes; track button) {\n      @if (isButtonVisible(button.exportType)) {\n        <mat-button-toggle [value]=\"button.exportType\" class=\"button.className\">\n          <ng-container *ngTemplateOutlet=\"buttonTemplate;context:{button:button}\"></ng-container>\n        </mat-button-toggle>\n      }\n    }\n\n    @for (customButton of config.options; track customButton) {\n      <mat-button-toggle [value]=\"customButton.exportType\">\n        <ng-container *ngTemplateOutlet=\"buttonTemplate;context:{button:customButton}\"></ng-container>\n      </mat-button-toggle>\n    }\n  </mat-button-toggle-group>\n  <mat-expansion-panel class=\"acordion\" [expanded]=\"isExpanded\">\n    <mat-expansion-panel-header collapsedHeight=\"32px\" expandedHeight=\"32px\">\n      <mat-panel-title>\n        {{ 'EXPORT.DIALOG.ADVANCED_OPTIONS' | oTranslate }}\n      </mat-panel-title>\n    </mat-expansion-panel-header>\n    <div class=\"inputs_container\">\n      <mat-label class=\"dialog-titles\">{{'EXPORT.DIALOG.FILE_NAME'|oTranslate}}</mat-label>\n      <mat-form-field subscriptSizing=\"dynamic\" class=\"filename_input\">\n        <input matInput [(ngModel)]=\"filename\" placeholder=\"{{ 'EXPORT.DIALOG.FILE_NAME.PLACEHOLDER' | oTranslate }}\" />\n      </mat-form-field>\n      <span class=\"dialog-titles\">{{'EXPORT.DIALOG.ORIENTATION'|oTranslate}}</span>\n      <mat-radio-group name=\"Orientation\" [(ngModel)]=\"vertical\" class=\"o-flex-row o-gap-12\" [disabled]=\"selectedExportFormat !== 'pdf'\">\n        @for (orientation of orientations; track orientation) {\n          <mat-radio-button name=\"Orientation\" [value]=\"orientation.value\"\n            [checked]=\"vertical === orientation.value\">\n            {{ orientation.text | oTranslate}}\n          </mat-radio-button>\n        }\n      </mat-radio-group>\n      <span class=\"dialog-titles\">{{'EXPORT.DIALOG.COLUMNS'|oTranslate}}</span>\n      <mat-selection-list dense #columnsList cdkDropList [cdkDropListData]=\"columnsData\" (cdkDropListDropped)=\"dropColumns($event)\" class=\"columns\"\n        [(ngModel)]=\"columns\" [compareWith]=\"columnsCompareFunction\">\n        @for (column of columnsData; track column) {\n          <mat-list-option checkboxPosition=\"before\" [value]=\"column\" cdkDrag>\n            <div class=\"o-flex-row o-layout-align-sa-center\">\n              <span matListItemLine class=\"o-flex\">\n                {{column | oTranslate}}\n              </span>\n              <mat-icon mat-list-icon class=\"button-edit\">drag_handle</mat-icon>\n            </div>\n          </mat-list-option>\n        }\n      </mat-selection-list>\n\n    </div>\n  </mat-expansion-panel>\n</mat-dialog-content>\n\n<mat-dialog-actions class=\"o-layout-align-end-center\">\n  <button type=\"button\" mat-stroked-button [mat-dialog-close]=\"false\" class=\"o-button-default cancel\">{{ 'CANCEL' | oTranslate }}</button>\n  <button type=\"button\" mat-stroked-button class=\"export_button\" (click)=\"export()\">\n    <mat-icon>ios_share</mat-icon>\n    <span>{{ 'EXPORT.DIALOG.EXPORT_BUTTON' | oTranslate }}</span>\n  </button>\n</mat-dialog-actions>\n\n<ng-template #buttonTemplate let-button=\"button\">\n  @if (button.icon!==undefined) {\n    <mat-icon class=\"material-symbols-outlined o-button-icon\" style=\"vertical-align:middle\">{{ button.icon }}</mat-icon>\n  }\n  @if (button.svgIcon!==undefined) {\n    <mat-icon class=\"material-symbols-outlined o-button-icon\" style=\"vertical-align:middle\"\n    [svgIcon]=\"button.svgIcon\"></mat-icon>\n  }\n  {{ button.olabel | oTranslate }}\n</ng-template>\n", styles: [".o-table-export-dialog .mat-mdc-raised-button{height:initial}.o-table-export-dialog .mat-mdc-raised-button .mdc-button__label{line-height:initial}.o-table-export-dialog mat-selection-list{margin-bottom:20px}.o-table-export-dialog .filename_input{margin-top:10px;display:flex;margin-bottom:20px}.o-table-export-dialog mat-radio-group{margin-top:10px;margin-bottom:20px}.o-table-export-dialog span.dialog-titles{font-weight:500}.o-table-export-dialog .acordion.mat-expansion-panel{box-shadow:none}.o-table-export-dialog .acordion.mat-expansion-panel .mat-expansion-panel-body{padding:0}.o-table-export-dialog .mat-expansion-panel-header:not([aria-disabled=true]){border-bottom:1px solid rgba(0,0,0,.16)}.o-table-export-dialog .mat-expansion-panel-header{border-radius:initial;margin-bottom:10px}.o-table-export-dialog .dialog_content{display:flex;flex-direction:column;height:100%;padding-bottom:0}.o-table-export-dialog .acordion{flex-grow:1;max-height:100%}.o-table-export-dialog .acordion.mat-expansion-panel.mat-expanded{overflow-y:auto}.o-table-export-dialog mat-expanded .inputs-container{max-height:100%;overflow-y:auto}.o-table-export-dialog .type_toggle_group{margin-bottom:20px;overflow:visible}.o-table-export-dialog .type_toggle_group .mat-button-toggle{flex:1}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i3.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: "    button[mat-button], button[mat-raised-button], button[mat-flat-button],    button[mat-stroked-button]  ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatButtonToggleModule }, { kind: "directive", type: i5.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i5.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatExpansionModule }, { kind: "component", type: i6.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i6.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: i6.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i9.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl],      input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i10.MatSelectionList, selector: "mat-selection-list", inputs: ["color", "compareWith", "multiple", "hideSingleSelectionIndicator", "disabled"], outputs: ["selectionChange"], exportAs: ["matSelectionList"] }, { kind: "component", type: i10.MatListOption, selector: "mat-list-option", inputs: ["togglePosition", "checkboxPosition", "color", "value", "selected"], outputs: ["selectedChange"], exportAs: ["matListOption"] }, { kind: "directive", type: i10.MatListSubheaderCssMatStyler, selector: "[mat-subheader], [matSubheader]" }, { kind: "directive", type: i10.MatListItemLine, selector: "[matListItemLine]" }, { kind: "ngmodule", type: MatMenuModule }, { kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i11.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i11.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "pipe", type: OTranslatePipe, name: "oTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: OTableExportDialogComponent, decorators: [{
            type: Component,
            args: [{ standalone: true, imports: [NgTemplateOutlet, FormsModule, ReactiveFormsModule, DragDropModule, MatButtonModule, MatButtonToggleModule, MatDialogModule, MatExpansionModule, MatFormFieldModule, MatIconModule, MatInputModule, MatListModule, MatMenuModule, MatRadioModule, OTranslatePipe], selector: 'o-table-export-dialog', providers: [
                        OntimizeExportServiceProvider
                    ], changeDetection: ChangeDetectionStrategy.OnPush, host: {
                        class: 'o-table-export-dialog'
                    }, encapsulation: ViewEncapsulation.None, template: "<span mat-dialog-title>{{ 'TABLE.BUTTONS.EXPORT' | oTranslate }}</span>\n<mat-dialog-content class=\"dialog_content\">\n  <div mat-subheader>{{ 'TABLE.DIALOG.EXPORT.DESCRIPTION' | oTranslate }}</div>\n  <mat-button-toggle-group class=\"type_toggle_group\" #group=\"matButtonToggleGroup\" [(ngModel)]=\"selectedExportFormat\">\n    @for (button of exportTypes; track button) {\n      @if (isButtonVisible(button.exportType)) {\n        <mat-button-toggle [value]=\"button.exportType\" class=\"button.className\">\n          <ng-container *ngTemplateOutlet=\"buttonTemplate;context:{button:button}\"></ng-container>\n        </mat-button-toggle>\n      }\n    }\n\n    @for (customButton of config.options; track customButton) {\n      <mat-button-toggle [value]=\"customButton.exportType\">\n        <ng-container *ngTemplateOutlet=\"buttonTemplate;context:{button:customButton}\"></ng-container>\n      </mat-button-toggle>\n    }\n  </mat-button-toggle-group>\n  <mat-expansion-panel class=\"acordion\" [expanded]=\"isExpanded\">\n    <mat-expansion-panel-header collapsedHeight=\"32px\" expandedHeight=\"32px\">\n      <mat-panel-title>\n        {{ 'EXPORT.DIALOG.ADVANCED_OPTIONS' | oTranslate }}\n      </mat-panel-title>\n    </mat-expansion-panel-header>\n    <div class=\"inputs_container\">\n      <mat-label class=\"dialog-titles\">{{'EXPORT.DIALOG.FILE_NAME'|oTranslate}}</mat-label>\n      <mat-form-field subscriptSizing=\"dynamic\" class=\"filename_input\">\n        <input matInput [(ngModel)]=\"filename\" placeholder=\"{{ 'EXPORT.DIALOG.FILE_NAME.PLACEHOLDER' | oTranslate }}\" />\n      </mat-form-field>\n      <span class=\"dialog-titles\">{{'EXPORT.DIALOG.ORIENTATION'|oTranslate}}</span>\n      <mat-radio-group name=\"Orientation\" [(ngModel)]=\"vertical\" class=\"o-flex-row o-gap-12\" [disabled]=\"selectedExportFormat !== 'pdf'\">\n        @for (orientation of orientations; track orientation) {\n          <mat-radio-button name=\"Orientation\" [value]=\"orientation.value\"\n            [checked]=\"vertical === orientation.value\">\n            {{ orientation.text | oTranslate}}\n          </mat-radio-button>\n        }\n      </mat-radio-group>\n      <span class=\"dialog-titles\">{{'EXPORT.DIALOG.COLUMNS'|oTranslate}}</span>\n      <mat-selection-list dense #columnsList cdkDropList [cdkDropListData]=\"columnsData\" (cdkDropListDropped)=\"dropColumns($event)\" class=\"columns\"\n        [(ngModel)]=\"columns\" [compareWith]=\"columnsCompareFunction\">\n        @for (column of columnsData; track column) {\n          <mat-list-option checkboxPosition=\"before\" [value]=\"column\" cdkDrag>\n            <div class=\"o-flex-row o-layout-align-sa-center\">\n              <span matListItemLine class=\"o-flex\">\n                {{column | oTranslate}}\n              </span>\n              <mat-icon mat-list-icon class=\"button-edit\">drag_handle</mat-icon>\n            </div>\n          </mat-list-option>\n        }\n      </mat-selection-list>\n\n    </div>\n  </mat-expansion-panel>\n</mat-dialog-content>\n\n<mat-dialog-actions class=\"o-layout-align-end-center\">\n  <button type=\"button\" mat-stroked-button [mat-dialog-close]=\"false\" class=\"o-button-default cancel\">{{ 'CANCEL' | oTranslate }}</button>\n  <button type=\"button\" mat-stroked-button class=\"export_button\" (click)=\"export()\">\n    <mat-icon>ios_share</mat-icon>\n    <span>{{ 'EXPORT.DIALOG.EXPORT_BUTTON' | oTranslate }}</span>\n  </button>\n</mat-dialog-actions>\n\n<ng-template #buttonTemplate let-button=\"button\">\n  @if (button.icon!==undefined) {\n    <mat-icon class=\"material-symbols-outlined o-button-icon\" style=\"vertical-align:middle\">{{ button.icon }}</mat-icon>\n  }\n  @if (button.svgIcon!==undefined) {\n    <mat-icon class=\"material-symbols-outlined o-button-icon\" style=\"vertical-align:middle\"\n    [svgIcon]=\"button.svgIcon\"></mat-icon>\n  }\n  {{ button.olabel | oTranslate }}\n</ng-template>\n", styles: [".o-table-export-dialog .mat-mdc-raised-button{height:initial}.o-table-export-dialog .mat-mdc-raised-button .mdc-button__label{line-height:initial}.o-table-export-dialog mat-selection-list{margin-bottom:20px}.o-table-export-dialog .filename_input{margin-top:10px;display:flex;margin-bottom:20px}.o-table-export-dialog mat-radio-group{margin-top:10px;margin-bottom:20px}.o-table-export-dialog span.dialog-titles{font-weight:500}.o-table-export-dialog .acordion.mat-expansion-panel{box-shadow:none}.o-table-export-dialog .acordion.mat-expansion-panel .mat-expansion-panel-body{padding:0}.o-table-export-dialog .mat-expansion-panel-header:not([aria-disabled=true]){border-bottom:1px solid rgba(0,0,0,.16)}.o-table-export-dialog .mat-expansion-panel-header{border-radius:initial;margin-bottom:10px}.o-table-export-dialog .dialog_content{display:flex;flex-direction:column;height:100%;padding-bottom:0}.o-table-export-dialog .acordion{flex-grow:1;max-height:100%}.o-table-export-dialog .acordion.mat-expansion-panel.mat-expanded{overflow-y:auto}.o-table-export-dialog mat-expanded .inputs-container{max-height:100%;overflow-y:auto}.o-table-export-dialog .type_toggle_group{margin-bottom:20px;overflow:visible}.o-table-export-dialog .type_toggle_group .mat-button-toggle{flex:1}\n"] }]
        }], ctorParameters: () => [{ type: i1.MatDialogRef }, { type: i0.Injector }, { type: i12.OTableExportConfiguration, decorators: [{
                    type: Inject,
                    args: [MAT_DIALOG_DATA]
                }] }] });
//# sourceMappingURL=data:application/json;base64, 