// File Path: monorepo/web/frontend/src/pages/Admin/Setting/VehicleType/Delete/Page.jsx
import React from "react";
import { useVehicleTypeManager } from "../../../../../services/Services";
import { SettingsDeleteView } from "../../../../../components/business/views";
import {
  TruckIcon,
  WrenchScrewdriverIcon,
  DocumentTextIcon,
} from "@heroicons/react/24/outline";

// Move static configuration outside component to prevent recreation
const IMPACT_WARNINGS = [
  {
    icon: WrenchScrewdriverIcon,
    text: "Any vehicles currently using this vehicle type will be affected",
  },
  {
    icon: DocumentTextIcon,
    text: "Historical records and reports that reference this vehicle type",
  },
  {
    icon: TruckIcon,
    text: "Future vehicle registrations will not have access to this category",
  },
];

const ALTERNATIVE_TEXT =
  "Consider marking the vehicle type as inactive instead of deleting it to preserve historical data and allow for potential reactivation in the future.";

function SettingVehicleTypeDeletePage() {
  const vehicleTypeManager = useVehicleTypeManager();

  return (
    <SettingsDeleteView
      entityType="vehicleType"
      entityTypePlural="Vehicle Types"
      entityIcon={TruckIcon}
      entityManager={vehicleTypeManager}
      basePath="/admin/settings/vehicle-type"
      listPath="/admin/settings/vehicle-types"
      title="Delete Vehicle Type"
      subtitle="Permanent deletion confirmation"
      impactWarnings={IMPACT_WARNINGS}
      alternativeText={ALTERNATIVE_TEXT}
      requiresConfirmation={true}
    />
  );
}

export default SettingVehicleTypeDeletePage;
