import { ComponentProps, forwardRef } from 'react' import { Button, Card, CardDescription, CardHeader, CardTitle } from 'ui' import { Shortcut } from '@/components/ui/Shortcut' import type { ShortcutId } from '@/state/shortcuts/registry' interface ActionPanelProps extends Omit, 'onClick' | 'type'> { title: string description: string buttonLabel: ComponentProps['children'] onClick: () => void loading: ComponentProps['loading'] icon?: ComponentProps['icon'] variant?: ComponentProps['variant'] shortcutId?: ShortcutId } export const ActionPanel = forwardRef( ( { title, description, buttonLabel, onClick, loading, icon, variant, shortcutId, ...props }, ref ) => { const button = ( ) return (
{title} {description}
{shortcutId ? ( {button} ) : ( button )}
) } ) ActionPanel.displayName = 'ActionPanel'