import React, { useState } from "react"; import { useModalState } from "../../zustand/Modal"; import { ModalEnum } from "../../enums/Model"; import { FaMoneyBill } from "react-icons/fa"; import { IoMdArrowDropdown, IoMdArrowDropup } from "react-icons/io"; const DivisionsHeaderSection = () => { const [showAll, setShowAll] = useState(false); const toggleShowAll = () => { setShowAll(!showAll); }; const { isOpen, setIsOpen } = useModalState((state) => state); const handelOpenModal = () => { setIsOpen(ModalEnum?.DIVISION_ADD); }; // Define the interface for your data interface Item { icon: JSX.Element; name: string; } const data: Item[] = [ { icon: , name: "الطالبات" }, { icon: , name: "الطالبات" }, { icon: , name: "الطالبات" }, { icon: , name: "الطالبات" }, { icon: , name: "الطالبات" }, { icon: , name: "الطالبات" }, { icon: , name: "الطالبات" }, { icon: , name: "الطالبات" }, ]; return (
{data?.map((item: Item, index: number) => { return (
= 5 ? "hidden" : ""}`} > {item?.icon}

{item?.name}

); })}
{showAll ? ( ) : ( )}
); }; export default DivisionsHeaderSection;