import React, { ElementType } from 'react'; import { Icon } from '../../ui/icon'; import { FileName } from '../../ui/file-name'; import { HoverCard } from '../../ui/hover-card'; import { AssetNotPredictive } from '../asset-not-predictive'; import type { ReportMetricAssetRow } from '../../types'; import { AssetMetaTag } from '../asset-meta-tag'; import css from './asset-name.module.css'; const RUN_TITLE_CURRENT = 'Current'; const RUN_TITLE_BASELINE = 'Baseline'; const RUNS_LABELS = [RUN_TITLE_CURRENT, RUN_TITLE_BASELINE]; export type AssetNameProps = { className?: string; row: ReportMetricAssetRow; EntryComponentLink: ElementType; }; export const AssetName = (props: AssetNameProps) => { const { className = '', EntryComponentLink, row } = props; const { label, isNotPredictive, runs, isChunk, isEntry, isInitial } = row; return ( {isNotPredictive && ( } className={css.notPredictive} hoverCardClassName={css.notPredictiveHoverCard} > )} {isEntry && ( )} {isInitial && ( )} {isChunk && ( )} ); };