"use client"; import { useMediaStore } from "@/stores/media-store"; import { useTimelineStore } from "@/stores/timeline-store"; import { ScrollArea } from "../../ui/scroll-area"; import { AudioProperties } from "./audio-properties"; import { MediaProperties } from "./media-properties"; import { TextProperties } from "./text-properties"; import { SquareSlashIcon } from "lucide-react"; export function PropertiesPanel() { const { selectedElements, tracks } = useTimelineStore(); const { mediaItems } = useMediaStore(); return ( <> {selectedElements.length > 0 ? ( {selectedElements.map(({ trackId, elementId }) => { const track = tracks.find((t) => t.id === trackId); const element = track?.elements.find((e) => e.id === elementId); if (element?.type === "text") { return (
); } if (element?.type === "media") { const mediaItem = mediaItems.find( (item) => item.id === element.mediaId ); if (mediaItem?.type === "audio") { return ; } return (
); } return null; })}
) : ( )} ); } function EmptyView() { return (

It’s empty here

Click an element on the timeline to edit its properties

); }