import { Button } from "../ui/button";
import { Search, Edit, Trash2 } from "lucide-react";

interface TableActionButtonsProps {
  onView?: () => void;
  onEdit?: () => void;
  onDelete?: () => void;
  viewTitle?: string;
  editTitle?: string;
  deleteTitle?: string;
}

export function TableActionButtons({
  onView,
  onEdit,
  onDelete,
  viewTitle = "상세보기",
  editTitle = "수정",
  deleteTitle = "삭제"
}: TableActionButtonsProps) {
  return (
    <div className="flex items-center justify-end gap-1 md:gap-2">
      {onView && (
        <Button
          variant="ghost"
          size="sm"
          onClick={onView}
          title={viewTitle}
          className="h-8 w-8 p-0 md:h-9 md:w-9"
        >
          <Search className="h-4 w-4" />
        </Button>
      )}
      {onEdit && (
        <Button
          variant="ghost"
          size="sm"
          onClick={onEdit}
          title={editTitle}
          className="h-8 w-8 p-0 md:h-9 md:w-9"
        >
          <Edit className="h-4 w-4" />
        </Button>
      )}
      {onDelete && (
        <Button
          variant="ghost"
          size="sm"
          onClick={onDelete}
          title={deleteTitle}
          className="h-8 w-8 p-0 md:h-9 md:w-9 hover:text-destructive"
        >
          <Trash2 className="h-4 w-4" />
        </Button>
      )}
    </div>
  );
}
