import React from 'react';
import { EMPTY_VALUE } from '../constant';
import { getTitleByRelationshipCode } from './get-title-by-relationship-code';
import { PHXDescriptionListInTooltip } from '../../DescriptionListInTooltip';
import { PHXTextV2 } from '../../TextV2';
import { PHXBox } from '../../Box';
export const renderParentCellTooltip = (value) => (React.createElement("div", null, Array.isArray(value) && value.length > 0 ? (React.createElement(PHXDescriptionListInTooltip, { items: value.map((parent) => ({
        title: getTitleByRelationshipCode(parent === null || parent === void 0 ? void 0 : parent.relationship_code),
        description: parent.full_name,
    })), tooltipClassName: 'max-w-none w-auto min-w-[150px]', trigger: React.createElement(PHXBox, { maxWidth: 'table-cell', widthFitContent: true, borderBottom: 'medium', borderStyle: 'dotted', pb: 'atomic' },
        React.createElement(PHXTextV2, { color: 'primary', size: 'caption', isTruncate: true }, value.map((parent) => `${parent.full_name}`).join(', '))) })) : (React.createElement(PHXBox, { maxWidth: 'table-cell', widthFitContent: true, pb: 'atomic' },
    React.createElement(PHXTextV2, { color: 'primary', size: 'caption', isTruncate: true }, EMPTY_VALUE)))));
//# sourceMappingURL=render-parent-cell-tooltip.js.map