'use strict';
import { getOptionalPropertyValue } from '../../../../fd-toolbox/objects/property-value.js';
import { isUrlCell } from '../services/table-private-cell.js';
import { propertyTypeFormats } from '../../constants/property-type-formats.js';
import { tryParseNumber } from '../../../../fd-toolbox/numbers/numbers.js';
import { enumValueToColor, enumDefaultColor } from '../table-constants.js';

var __defProp=Object['defineProperty'],__name=(_0x390464,_0x4f6346)=>__defProp(_0x390464,'name',{'value':_0x4f6346,'configurable':!![]});function getLabelUrl(_0x12883e){let _0x21a68f;return isUrlCell(_0x12883e)&&(_0x21a68f=getOptionalPropertyValue(_0x12883e['row']['item'],_0x12883e['internalTableColumn']['itemPropertyName'])),_0x21a68f;}__name(getLabelUrl,'getLabelUrl');function isColorfulCell(_0x5e9b82){const _0x3f0307=_0x5e9b82['internalTableColumn']['uiPropertyMeta']?.['colorful']??_0x5e9b82['internalTableColumn']['enumInfo']?.['isColorful'];return _0x5e9b82['internalTableColumn']['propertyTypeFormat']===propertyTypeFormats['enum']&&_0x3f0307&&!_0x5e9b82['internalTableColumn']['uiPropertyMeta']?.['notColorful'];}__name(isColorfulCell,'isColorfulCell');function getBodyBackgroundColorClassNameByCellContext(_0xb3d28a){const _0x571305=getBodyEnumValueFromCellContext(_0xb3d28a);return enumValueToColor[_0x571305]||enumDefaultColor;}__name(getBodyBackgroundColorClassNameByCellContext,'getBodyBackgroundColorClassNameByCellContext');function getBodyEnumValueFromCellContext(_0x39578f){const _0x4a3ad6=getOptionalPropertyValue(_0x39578f['row']['item'],_0x39578f['internalTableColumn']['itemPropertyName']);return tryParseNumber(_0x4a3ad6??'0');}__name(getBodyEnumValueFromCellContext,'getBodyEnumValueFromCellContext');

export { getBodyBackgroundColorClassNameByCellContext, getLabelUrl, isColorfulCell };
