/**
 * 採購單操作按鈕元件
 */

import { Edit, Eye } from "lucide-react";
import { Button } from "../ui/button";
import type { PurchaseOrder } from "../../types/purchase-order";

interface PurchaseOrderActionsProps {
  order: PurchaseOrder;
  onEdit: (order: PurchaseOrder) => void;
  onView: (order: PurchaseOrder) => void;
}

export function PurchaseOrderActions({
  order,
  onEdit,
  onView,
}: PurchaseOrderActionsProps) {
  return (
    <div className="flex justify-end gap-2">
      <Button
        variant="outline"
        size="sm"
        onClick={() => onView(order)}
        className="button-outlined-primary"
        title="查看採購單"
      >
        <Eye className="h-4 w-4" />
      </Button>
      <Button
        variant="outline"
        size="sm"
        onClick={() => onEdit(order)}
        className="button-outlined-primary"
        title="編輯採購單"
      >
        <Edit className="h-4 w-4" />
      </Button>
    </div>
  );
}
