"use client"; import { ScrollArea } from "../../ui/scroll-area"; import { AudioProperties } from "./audio-properties"; import { VideoProperties } from "./video-properties"; import { TextProperties } from "./text-properties"; import { SquareSlashIcon } from "lucide-react"; import { useEditor } from "@/hooks/use-editor"; import { useElementSelection } from "@/hooks/timeline/element/use-element-selection"; export function PropertiesPanel() { const editor = useEditor(); const { selectedElements } = useElementSelection(); const elementsWithTracks = editor.timeline.getElementsWithTracks({ elements: selectedElements, }); return ( <> {selectedElements.length > 0 ? ( {elementsWithTracks.map(({ track, element }) => { if (element.type === "text") { return (
); } if (element.type === "audio") { return ; } if (element.type === "video" || element.type === "image") { return (
); } return null; })}
) : ( )} ); } function EmptyView() { return (

It’s empty here

Click an element on the timeline to edit its properties

); }