'use strict';
import { tableDisplayModes } from '../../../../fd-toolbox/enums/enums.js';
import { tableCustomAttributesValues } from '../table-custom-attributes.js';
import { internalTableColumnTypes } from '../table-models.js';
import { emitResizeEvent } from '../services/fd-table-private-resize-columns.js';

var __defProp=Object['defineProperty'],__name=(_0x1dee59,_0x139a32)=>__defProp(_0x1dee59,'name',{'value':_0x139a32,'configurable':!![]});function onInitTableHeaderCell(_0x1bcf58){_0x1bcf58(tableCustomAttributesValues['headerCell']);}__name(onInitTableHeaderCell,'onInitTableHeaderCell');function isCheckboxCell(_0x326ec1){return _0x326ec1['type']===internalTableColumnTypes['checkBox'];}__name(isCheckboxCell,'isCheckboxCell');function isActionCell(_0x39d3ca){return _0x39d3ca['type']===internalTableColumnTypes['action']||_0x39d3ca['type']===internalTableColumnTypes['customHeaderAction'];}__name(isActionCell,'isActionCell');function onTableHeaderSort(_0x3ba095,_0x438de5){_0x438de5(_0x3ba095);}__name(onTableHeaderSort,'onTableHeaderSort');function resizeHeaderColumn(_0x434f62,_0x3a8a42){let _0xf30c16={'width':_0x434f62,'index':_0x3a8a42};emitResizeEvent(_0xf30c16);}__name(resizeHeaderColumn,'resizeHeaderColumn');function getHeaderCellClasses(_0x20c357,_0x69bd08){switch(_0x20c357['type']){case internalTableColumnTypes['action']:case internalTableColumnTypes['customHeaderAction']:return _0x69bd08===tableDisplayModes['minimal']?'m-auto\x20hidden\x20p-1':'m-auto\x20hidden';case internalTableColumnTypes['checkBox']:return _0x69bd08===tableDisplayModes['minimal']?'hidden\x20min-w-4\x20p-1':'hidden\x20min-w-4';default:return _0x69bd08===tableDisplayModes['minimal']?'relative\x20m-0\x20p-1':'relative\x20m-0';}}__name(getHeaderCellClasses,'getHeaderCellClasses');function getTableHeaderCellContext(_0x12d31a,_0x1f201b){return {'internalTableColumn':_0x12d31a,'tableInstance':_0x1f201b};}__name(getTableHeaderCellContext,'getTableHeaderCellContext');function shouldFadeOutHandle(_0x2d0c5c,_0x531652){return _0x2d0c5c!==_0x531652&&_0x2d0c5c!==_0x531652+(0x6f9*0x5+-0x797+-0x1b45*0x1);}__name(shouldFadeOutHandle,'shouldFadeOutHandle');function shouldHideResizableHandle(_0x97fff0,_0x509ccc){return _0x97fff0['index']===_0x509ccc['internalTableColumns']['length']||isCheckboxCell(_0x97fff0)||isActionCell(_0x97fff0);}__name(shouldHideResizableHandle,'shouldHideResizableHandle');function isFirstColumn(_0x255bab,_0x355749,_0x380cdd){return isActionColumnAtFirstIndex(_0x255bab,_0x355749)||isCheckboxColumnAtFirstOrSecondIndex(_0x255bab,_0x355749)||isFirstRegularColumnBeforeActiveIndex(_0x255bab,_0x355749,_0x380cdd);}__name(isFirstColumn,'isFirstColumn');function isFirstOrSecondIndexColumn(_0x5bf0fe){return _0x5bf0fe===-0xfce*0x1+-0x1*0x2a7+0x1275||_0x5bf0fe===0x12c7*-0x1+-0x1102*-0x1+0x1c6;}__name(isFirstOrSecondIndexColumn,'isFirstOrSecondIndexColumn');function findFirstNonCheckboxOrActionColumnIndex(_0x297cea){return _0x297cea['findIndex'](_0xb3d730=>!isCheckboxCell(_0xb3d730)&&!isActionCell(_0xb3d730));}__name(findFirstNonCheckboxOrActionColumnIndex,'findFirstNonCheckboxOrActionColumnIndex');function initTableHeaderPanelLayout(_0xe6d07b,_0x3ae5d6,_0x4c6d6c){const _0x1cc715=Object['values'](_0xe6d07b);if(_0x1cc715['length']===_0x3ae5d6['length']){const _0x70ff7a=-0x1*0x226a+-0x1*-0x1f39+0x13*0x2b+0.1;_0x4c6d6c([..._0x1cc715,_0x70ff7a]);}}__name(initTableHeaderPanelLayout,'initTableHeaderPanelLayout');function isActionColumnAtFirstIndex(_0xf48be,_0x12b28f){return _0xf48be===-0x2707*0x1+-0x219*-0xd+-0x12d*-0xa&&isActionCell(_0x12b28f);}__name(isActionColumnAtFirstIndex,'isActionColumnAtFirstIndex');function isCheckboxColumnAtFirstOrSecondIndex(_0x3417f5,_0x476dd7){return isFirstOrSecondIndexColumn(_0x3417f5)&&isCheckboxCell(_0x476dd7);}__name(isCheckboxColumnAtFirstOrSecondIndex,'isCheckboxColumnAtFirstOrSecondIndex');function isFirstRegularColumnBeforeActiveIndex(_0x428638,_0x49e936,_0x40b7ec){return findFirstNonCheckboxOrActionColumnIndex(_0x40b7ec)===_0x428638-(-0x4d6*0x8+-0x1b6c+0x421d)&&_0x49e936['index']===_0x428638;}__name(isFirstRegularColumnBeforeActiveIndex,'isFirstRegularColumnBeforeActiveIndex');

export { findFirstNonCheckboxOrActionColumnIndex, getHeaderCellClasses, getTableHeaderCellContext, initTableHeaderPanelLayout, isActionCell, isCheckboxCell, isFirstColumn, isFirstOrSecondIndexColumn, onInitTableHeaderCell, onTableHeaderSort, resizeHeaderColumn, shouldFadeOutHandle, shouldHideResizableHandle };
