import React from "react";
import { useServiceFeeManager } from "../../../../../services/Services";
import { SettingsDeleteView } from "../../../../../components/business/views";
import { CreditCardIcon, BanknotesIcon, DocumentTextIcon, CalculatorIcon } from "@heroicons/react/24/outline";

function SettingServiceFeeDeletePage() {
  const serviceFeeManager = useServiceFeeManager();

  // Define impact warnings
  const impactWarnings = [
    {
      icon: CalculatorIcon,
      text: "Active transactions using this service fee rate will be affected"
    },
    {
      icon: DocumentTextIcon,
      text: "Historical billing records and reports that reference this fee"
    },
    {
      icon: BanknotesIcon,
      text: "Future transactions will not have access to this fee option"
    }
  ];

  // Define alternative text
  const alternativeText = "Consider marking the service fee as inactive instead of deleting it to preserve transaction history and allow for potential reactivation in the future.";

  return (
    <SettingsDeleteView
      entityType="serviceFee"
      entityTypePlural="Service Fees"
      entityIcon={CreditCardIcon}
      entityManager={serviceFeeManager}
      basePath="/admin/settings/service-fee"
      listPath="/admin/settings/service-fees"
      title="Delete Service Fee"
      subtitle="Permanent deletion confirmation"
      impactWarnings={impactWarnings}
      alternativeText={alternativeText}
      requiresConfirmation={true}
    />
  );
}

export default SettingServiceFeeDeletePage;