import { Eye, EyeSlash } from "@phosphor-icons/react"; import type { GsapAnimation } from "@hyperframes/core/gsap-parser"; import { Music } from "../../icons/SystemIcons"; import type { TimelineElement } from "../store/playerStore"; import type { TimelineEditCallbacks } from "./timelineCallbacks"; import { getTimelinePropertyLanes } from "./TimelinePropertyLanes"; import { LayerDisclosureRow } from "./LayerDisclosureRow"; import { TrackClipCount } from "./TrackClipCount"; import { LABEL_COL_W, LANE_H, getTimelineLaneTop } from "./timelineLayout"; import type { TimelineTheme } from "./timelineTheme"; import { resolveLaneHeaderState, type KeyframeNavigationState, type TimelinePropertyLane, } from "./trackHeaderLaneState"; import { valueReadout } from "./trackHeaderLaneValues"; interface TimelineTrackHeaderProps { trackNumber: number; trackLabel: string; contentOrigin: number; /** The track's active keyframe clip (selected, else primary) — the one whose * disclosure + property rows this header shows, whether expanded or not. */ keyframeClip: TimelineElement | null; /** Clips on this track, so the header can say how many the row holds. */ clipCount: number; isExpanded: boolean; animations: readonly GsapAnimation[]; currentTime: number; isTrackHidden: boolean; isAudioTrack: boolean; theme: TimelineTheme; onToggleClipExpanded: () => void; onToggleTrackHidden: TimelineEditCallbacks["onToggleTrackHidden"]; onTogglePropertyGroupKeyframe?: TimelineEditCallbacks["onTogglePropertyGroupKeyframe"]; onSeek?: (time: number) => void; } function VisibilityButton({ hidden, trackNumber, visible, onToggle, }: { hidden: boolean; trackNumber: number; visible: boolean; onToggle: TimelineEditCallbacks["onToggleTrackHidden"]; }) { if (!visible) return