import { ToggleGroup, ToggleGroupItem, Table, TableHeader, TableRow, TableBody, TableHead, ScrollArea, Button, } from "@marzneshin/components"; import { useScreenBreakpoint } from "@marzneshin/hooks"; import { cn } from "@marzneshin/utils"; import { SidebarEntityCard, } from "@marzneshin/features/entity-table/components"; import { useEntityTableContext, useSidebarEntityTableContext } from "@marzneshin/features/entity-table/contexts"; import { useTranslation } from "react-i18next"; export const SidebarEntitySelection = () => { const { sidebarEntityId, sidebarEntities, setSidebarEntityId, sidebarCardProps, } = useSidebarEntityTableContext() const { table } = useEntityTableContext() const isDesktop = useScreenBreakpoint("md"); const scrollBarHeight = (table.getState().pagination.pageSize <= 10 && isDesktop) ? "max-h-[45rem]" : "max-h-[20rem]" const { t } = useTranslation(); return (