import {
  WifiIcon,
  DevicePhoneMobileIcon,
  LockClosedIcon,
  CubeIcon,
} from "@heroicons/react/24/outline";
import { getServiceCategory } from "@/features/orders/utils/order-presenters";

interface OrderServiceIconProps {
  orderType?: string;
  category?: ReturnType<typeof getServiceCategory>;
  className?: string;
}

export function OrderServiceIcon({
  orderType,
  category,
  className = "h-6 w-6",
}: OrderServiceIconProps) {
  const resolvedCategory = category ?? getServiceCategory(orderType);

  switch (resolvedCategory) {
    case "internet":
      return <WifiIcon className={className} />;
    case "sim":
      return <DevicePhoneMobileIcon className={className} />;
    case "vpn":
      return <LockClosedIcon className={className} />;
    default:
      return <CubeIcon className={className} />;
  }
}
