import {Label} from '@gravity-ui/uikit'; import {ContentWithPopup} from '../../../../components/ContentWithPopup/ContentWithPopup'; import i18n from './i18n'; import {b} from './shared'; import type {SchemaData} from './types'; import {getPartitioningKeys, getPrimaryKeys} from './utils'; const MAX_VISIBLE_KEYS = 3; interface KeysViewProps { tableData: SchemaData[]; extended?: boolean; type: 'primary' | 'partitioning'; } export const KeysView = ({tableData, extended, type}: KeysViewProps) => { const keys = type === 'primary' ? getPrimaryKeys(tableData) : getPartitioningKeys(tableData); const visibleCount = extended ? MAX_VISIBLE_KEYS : keys.length; const visibleKeys = keys.slice(0, visibleCount); const hiddenKeys = keys.slice(visibleCount); return keys.length > 0 ? (