import { Check, X } from "lucide-react";
import { Button } from "@/shared/common/ui/button";
import type { EmployeePositionChangeRequest } from "@/user-management/services/api/employeePositionChangeRequestService";

export type UserPositionApprovalDecision = "approve" | "reject";

interface UserPositionApprovalActionsProps {
  item: EmployeePositionChangeRequest;
  onDecision: (
    type: UserPositionApprovalDecision,
    item: EmployeePositionChangeRequest,
  ) => void;
}

export default function UserPositionApprovalActions({
  item,
  onDecision,
}: UserPositionApprovalActionsProps) {
  return (
    <div className="flex flex-wrap gap-2">
      <Button
        size="sm"
        onClick={() => onDecision("approve", item)}
        className="gap-1.5"
      >
        <Check className="h-4 w-4" />
        Approve
      </Button>
      <Button
        size="sm"
        variant="destructive"
        onClick={() => onDecision("reject", item)}
        className="gap-1.5"
      >
        <X className="h-4 w-4" />
        Reject
      </Button>
    </div>
  );
}
