"use client"; import { Redo2, Undo2 } from "lucide-react"; import type { Project } from "@pien-studio/types"; import { useTranslations } from "../../hooks/use-translations"; import { panelClass, panelTitleClass } from "../../lib/theme"; type Props = { history: { past: Project[]; future: Project[] }; isDark: boolean; canUndo: boolean; canRedo: boolean; onUndo: () => void; onRedo: () => void; onJumpToPast: (idx: number) => void; onJumpToFuture: (idx: number) => void; }; export function HistoryPanel({ history, isDark, canUndo, canRedo, onUndo, onRedo, onJumpToPast, onJumpToFuture, }: Props) { const { t } = useTranslations(); return (

{t("editor.history")}

{[...history.past].reverse().map((_, i) => { const idx = history.past.length - i; return ( ); })} {[...history.future].map((_, i) => ( ))} {history.past.length === 0 && history.future.length === 0 ? (

{t("editor.noHistoryYet")}

) : null}
); }