'use client'; import * as React from 'react'; import { Undo2, Redo2, History, Info } from 'lucide-react'; import { Button } from '@/components/ui/Button'; import { cn } from '@/lib/utils/cn'; import type { HistoryState } from '@/lib/history/history-manager'; export interface HistoryControlsProps { historyState: HistoryState; onUndo: () => void; onRedo: () => void; onClear?: () => void; className?: string; } export function HistoryControls({ historyState, onUndo, onRedo, onClear, className, }: HistoryControlsProps) { return (
{/* History Info */} {historyState.historySize > 0 && (

History Available

{historyState.historySize} action{historyState.historySize !== 1 ? 's' : ''} in history

{historyState.undoDescription && (

Next undo: {historyState.undoDescription}

)} {historyState.redoDescription && (

Next redo: {historyState.redoDescription}

)}
)} {/* Control Buttons */}
{onClear && historyState.historySize > 0 && ( )}
{/* Keyboard Shortcuts Info */}

History Shortcuts:

• Ctrl+Z: Undo last action

• Ctrl+Y or Ctrl+Shift+Z: Redo last action

History tracks up to 50 edit operations

); }