"use client";

import { applyFixSuggestion } from "@/lib/actions/fix-queue";

export function ApplyFixButton({ suggestionId }: { suggestionId: string }) {
  return (
    <button
      type="button"
      onClick={() => {
        if (confirm("Apply this fix? The label's brand/blend will be updated.")) {
          applyFixSuggestion(suggestionId);
        }
      }}
      className="rounded-full bg-terracotta px-4 py-1.5 text-sm font-medium text-white hover:bg-terracotta/90"
    >
      Apply
    </button>
  );
}
