'use strict';
import { internalTableColumnTypes } from '../table-models.js';
import { isUrl, isEmail } from '../../core/property-types.js';
import { getOptionalPropertyValue } from '../../../../fd-toolbox/objects/property-value.js';
import { relationTypes } from '../../../../fd-toolbox/enums/enums.js';

var __defProp=Object['defineProperty'],__name=(_0x4a69ab,_0x1d6526)=>__defProp(_0x4a69ab,'name',{'value':_0x1d6526,'configurable':!![]});function isDefaultCell(_0x4a9237){return _0x4a9237['internalTableColumn']['type']===internalTableColumnTypes['default'];}__name(isDefaultCell,'isDefaultCell');function isExpandPropertyCell(_0x15832a){return !!_0x15832a['internalTableColumn']['expandInfo']&&_0x15832a['internalTableColumn']['propertyMeta']?.['relation']?.['type']===relationTypes['manyToOne'];}__name(isExpandPropertyCell,'isExpandPropertyCell');function isSortableColumn(_0x3bd66f){return _0x3bd66f['internalTableColumn']['propertyMeta']?.['relation']?.['type']!==relationTypes['oneToMany']&&_0x3bd66f['internalTableColumn']['propertyMeta']?.['relation']?.['type']!==relationTypes['manyToMany'];}__name(isSortableColumn,'isSortableColumn');function isDescriptionPropertyCell(_0x36404c){const _0x217cad=_0x36404c['tableInstance']['uiResourceMeta']?.['resourceMeta']['description']['resourceDescriptionProperty']??_0x36404c['tableInstance']['dataDescription']?.['descriptionPropertyName'];return !!_0x36404c['tableInstance']['dataDescription']&&_0x217cad===_0x36404c['internalTableColumn']['itemPropertyName'];}__name(isDescriptionPropertyCell,'isDescriptionPropertyCell');function isImageCell(_0x3a2d40){const _0xf4f52f=_0x3a2d40['tableInstance']['uiResourceMeta']?.['resourceMeta']['description']['useImage']??_0x3a2d40['tableInstance']['dataDescription']?.['useImage'];return !!_0xf4f52f&&isDescriptionPropertyCell(_0x3a2d40);}__name(isImageCell,'isImageCell');function isUrlCell(_0x43c795){return isUrl(_0x43c795['internalTableColumn']['propertyType'],_0x43c795['internalTableColumn']['propertyTypeFormat']);}__name(isUrlCell,'isUrlCell');function isEmailCell(_0x5a61c2){return isEmail(_0x5a61c2['internalTableColumn']['propertyType'],_0x5a61c2['internalTableColumn']['propertyTypeFormat']);}__name(isEmailCell,'isEmailCell');function isBlobCell(_0x2cf29c){const _0x624223=_0x2cf29c['internalTableColumn']['propertyMeta'];if(!_0x624223)return ![];return _0x624223['isBlobImage'];}__name(isBlobCell,'isBlobCell');function isClickableCell(_0x3b7572){return (isExpandPropertyCell(_0x3b7572)&&!isCellNavigationDisabled(_0x3b7572)||isDescriptionPropertyCell(_0x3b7572)&&!isCellNavigationDisabled(_0x3b7572))??(isUrlCell(_0x3b7572)||isEmailCell(_0x3b7572));}__name(isClickableCell,'isClickableCell');function getCellItem(_0x35b6d1,_0x5ec523){return _0x5ec523?getOptionalPropertyValue(_0x35b6d1,_0x5ec523['expandPropertyName']):_0x35b6d1;}__name(getCellItem,'getCellItem');function isCellNavigationDisabled(_0x5d8d12){return !!_0x5d8d12['tableInstance']['disableCellNavigationLinks'];}__name(isCellNavigationDisabled,'isCellNavigationDisabled');function isDateAsTimeAgo(_0x5b7997){return _0x5b7997['internalTableColumn']['isDateAsTimeAgo'];}__name(isDateAsTimeAgo,'isDateAsTimeAgo');

export { getCellItem, isBlobCell, isCellNavigationDisabled, isClickableCell, isDateAsTimeAgo, isDefaultCell, isDescriptionPropertyCell, isEmailCell, isExpandPropertyCell, isImageCell, isSortableColumn, isUrlCell };
