import React from "react";
import {CorporateUser} from "@/interfaces/user";
import {BsBank, BsPersonFill} from "react-icons/bs";
import IconCard from "./IconCard";
import useAssignmentsCorporates from "@/hooks/useAssignmentCorporates";
interface Props {
	users: CorporateUser[];
}
const MasterStatistical = (props: Props) => {
	const {users} = props;

	const usersList = React.useMemo(() => users.map((x) => x.id), [users]);

	const {assignments} = useAssignmentsCorporates({corporates: usersList});

	return (
		<div className="flex flex-wrap gap-2 items-center text-center">
			<IconCard Icon={BsBank} label="Consolidate" value={0} color="purple" onClick={() => console.log("clicked")} />
			{users.map((group) => (
				<IconCard
					key={group.id}
					Icon={BsBank}
					label={group.corporateInformation?.companyInformation?.name}
					value={0}
					color="purple"
					onClick={() => console.log("clicked", group)}
				/>
			))}
			<IconCard onClick={() => console.log("clicked")} Icon={BsPersonFill} label="Consolidate Highest Student" color="purple" />
		</div>
	);
};

export default MasterStatistical;
