import Modal from "@/components/elements/Modal";
import ServiceItem from "@/components/main/Services/ServiceItem";
import { Service } from "@/types/types";
import React from "react";

interface IBillboardModalProps {
  showServicesModal: boolean;
  setShowServicesModal: (e: boolean) => void;
  services: Service[];
}
function BillboardServicesModal({
  showServicesModal,
  setShowServicesModal,
  services,
}: IBillboardModalProps) {
  return (
    <Modal
      isOpen={showServicesModal}
      onClose={() => setShowServicesModal(false)}
      height="500px"
    >
      <div className="flex flex-col items-center max-w-xl mx-auto pb-16">
        <span className="font-bold text-lg my-2">لیست خدمات</span>
        {services?.map((service) => (
          <ServiceItem key={service._id} service={service} />
        ))}
      </div>
    </Modal>
  );
}

export default BillboardServicesModal;
