'use client'; import * as React from 'react'; import { Scissors, Copy, Clipboard, Trash2, CropIcon, Info } from 'lucide-react'; import { Button } from '@/components/ui/Button'; import { cn } from '@/lib/utils/cn'; import type { Selection } from '@/types/selection'; import { formatDuration } from '@/lib/audio/decoder'; export interface EditControlsProps { selection: Selection | null; hasClipboard: boolean; onCut: () => void; onCopy: () => void; onPaste: () => void; onDelete: () => void; onTrim: () => void; onClearSelection: () => void; className?: string; } export function EditControls({ selection, hasClipboard, onCut, onCopy, onPaste, onDelete, onTrim, onClearSelection, className, }: EditControlsProps) { const hasSelection = selection !== null; const selectionDuration = selection ? selection.end - selection.start : 0; return (
Selection Active
Duration: {formatDuration(selectionDuration)} | Start: {formatDuration(selection.start)} | End: {formatDuration(selection.end)}
Tip: Hold Shift and drag on the waveform to select a region
Keyboard Shortcuts:
• Shift+Drag: Select region
• Ctrl+A: Select all
• Ctrl+X: Cut
• Ctrl+C: Copy
• Ctrl+V: Paste
• Delete: Delete selection
• Escape: Clear selection