import React, { useId } from 'react' import Block from '../Primitives/Block/Block' import { StatCardV2Variant, type StatCardV2Props } from './statcardV2.types' import type { StatCardV2TokensType } from './statcardV2.tokens' import StatCardV2Title from './StatCardV2Title' import StatCardV2Subtitle from './StatCardV2Subtitle' import StatCardV2Value from './StatCardV2Value' import { SingleSelectV2 } from '../SingleSelectV2' import { SelectV2Size, SelectV2Variant } from '../SelectV2' type StatCardV2NoDataProps = Pick< StatCardV2Props, | 'title' | 'titleIcon' | 'helpIconText' | 'subtitle' | 'dropdownProps' | 'maxWidth' | 'minWidth' | 'width' | 'height' | 'showBorder' > & { tokens: StatCardV2TokensType isSmallScreen: boolean filteredProps: React.ComponentProps<'div'> } const StatCardV2NoData = ({ title, titleIcon, helpIconText, subtitle, dropdownProps, maxWidth, minWidth, width, height, showBorder = true, tokens, isSmallScreen, filteredProps, }: StatCardV2NoDataProps) => { const titleId = useId() const subtitleId = useId() return ( {titleIcon && !isSmallScreen && ( {titleIcon} )} {!isSmallScreen && subtitle && ( )} {isSmallScreen && dropdownProps?.items && dropdownProps.items.length > 0 && ( {})} variant={SelectV2Variant.NO_CONTAINER} size={SelectV2Size.SM} inline={true} /> )} ) } export default StatCardV2NoData