"use client";

import { Card } from "@/components/ui/card";
import { Settings } from "lucide-react";
import { Check } from "lucide-react";
import { PACKAGE_DETAIL } from "@/lib/strings";

interface OtherServicesCardProps {
  services: string[];
  className?: string;
}

/**
 * Other services list with checkmarks (Overview / Services tab).
 */
export function OtherServicesCard({
  services,
  className,
}: OtherServicesCardProps) {
  if (!services?.length) return null;

  return (
    <Card
      className={`overflow-hidden rounded-xl border border-gray-200 bg-white shadow-sm ${className ?? ""}`}
    >
      <div className="px-4 pb-4">
        <p className="mb-2 flex items-center gap-2 text-sm font-medium text-[#023047]">
          <Settings className="h-4 w-4 shrink-0" />
          {PACKAGE_DETAIL.OTHER_SERVICES}
        </p>
        <ul className="flex flex-wrap gap-x-4 gap-y-2">
          {services.map((s, idx) => (
            <li
              key={idx}
              className="flex items-center gap-2 text-sm text-gray-700"
            >
              <span className="flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-green-100 text-green-600">
                <Check className="h-3 w-3" />
              </span>
              <span>{s}</span>
            </li>
          ))}
        </ul>
      </div>
    </Card>
  );
}
