import { ReactElement, useState } from 'react'; import imageColumnStyles from '../item-detail-list/columns/image-column.module.css'; import styles from './album-group-header.module.css'; import { TableItemSize } from './item-table-list'; import { ItemImage } from '/@/renderer/components/item-image/item-image'; import { PlayButton } from '/@/renderer/features/shared/components/play-button'; import { LONG_PRESS_PLAY_BEHAVIOR, PlayTooltip, } from '/@/renderer/features/shared/components/play-button-group'; import { usePlayButtonBehavior } from '/@/renderer/store'; import { LibraryItem, Song } from '/@/shared/types/domain-types'; import { Play } from '/@/shared/types/types'; interface AlbumGroupHeaderProps { groupRowCount?: number; onPlay?: (playType: Play) => void; size?: 'compact' | 'large' | 'normal'; song: Song | undefined; } export const AlbumGroupHeader = ({ groupRowCount, onPlay, size = 'normal', song, }: AlbumGroupHeaderProps): ReactElement => { const [isHovered, setIsHovered] = useState(false); const playButtonBehavior = usePlayButtonBehavior(); const rowHeight = { compact: TableItemSize.COMPACT, large: TableItemSize.LARGE, normal: TableItemSize.DEFAULT, }[size]; const infoHeight = groupRowCount !== undefined ? groupRowCount * rowHeight : undefined; return (