"use client";

import { Trash2 } from "lucide-react";

export function DeleteButton({
  label = "Sil",
  confirm = "Bu kaydı silmek istediğinize emin misiniz?",
}: {
  label?: string;
  confirm?: string;
}) {
  return (
    <button
      type="submit"
      onClick={(e) => {
        if (!window.confirm(confirm)) e.preventDefault();
      }}
      className="inline-flex items-center gap-1 rounded-md border border-red-200 bg-white px-2.5 py-1.5 text-xs font-medium text-red-700 transition hover:bg-red-50"
    >
      <Trash2 className="size-3.5" />
      {label}
    </button>
  );
}
