'use client'; import { motion } from 'framer-motion'; import { cn } from '@/lib/utils'; import type { IntervalState } from '@/lib/visualizations/types'; interface IntervalBarProps { interval: IntervalState; pixelsPerUnit: number; minValue: number; height?: number; className?: string; } const STATE_CLASSES = { normal: 'bg-[var(--muted)] border-[var(--border)] text-[var(--foreground)]', highlighted: 'bg-[var(--primary)]/30 border-[var(--primary)] text-[var(--primary)]', merging: 'bg-amber-500/30 border-amber-500 text-amber-500', merged: 'bg-green-500/30 border-green-500 text-green-500', dimmed: 'bg-[var(--muted)]/30 border-[var(--border)]/50 text-[var(--muted-foreground)] opacity-40', } as const; export function IntervalBar({ interval, pixelsPerUnit, minValue, height = 32, className, }: IntervalBarProps) { const width = (interval.end - interval.start) * pixelsPerUnit; const left = (interval.start - minValue) * pixelsPerUnit; const label = interval.label ?? `[${interval.start},${interval.end}]`; return ( {label} ); }