import React from 'react';
import { Panel } from './Panel';
import { Box } from './primitives/Box';
import { Button } from './Button';
import { Icon } from './Icon';
import { LucideIcon } from 'lucide-react';

export interface QuickAction {
  label: string;
  icon: LucideIcon;
  onClick: () => void;
  intent?: 'primary' | 'secondary' | 'danger';
}

export interface QuickActionsPanelProps {
  actions: QuickAction[];
}

export const QuickActionsPanel = ({ 
  actions 
}: QuickActionsPanelProps) => {
  return (
    <Panel title="Quick Actions">
      <Box display="flex" flexDirection="col" gap={2}>
        {actions.map((action, index) => (
          <Button 
            key={index} 
            variant={action.intent === 'danger' ? 'danger' : 'secondary'}
            onClick={action.onClick}
            fullWidth
          >
            <Box display="flex" alignItems="center" gap={3} fullWidth>
              <Icon icon={action.icon} size={4} />
              {action.label}
            </Box>
          </Button>
        ))}
      </Box>
    </Panel>
  );
};
