import { forwardRef, useState } from 'react' import { Download } from 'lucide-react' import { Button } from '../../Button' import { ButtonSize, ButtonType } from '../../Button/types' import Block from '../../Primitives/Block/Block' import PrimitiveText from '../../Primitives/PrimitiveText/PrimitiveText' import PrimitiveButton from '../../Primitives/PrimitiveButton/PrimitiveButton' import { FOUNDATION_THEME } from '../../../tokens' import { useResponsiveTokens } from '../../../hooks/useResponsiveTokens' import { TableTokenType } from '../dataTable.tokens' import { useBreakpoints } from '../../../hooks/useBreakPoints' import { BREAKPOINTS } from '../../../breakpoints/breakPoints' import { Drawer, DrawerTrigger, DrawerPortal, DrawerOverlay, DrawerContent, DrawerHeader, DrawerTitle, DrawerBody, } from '../../Drawer' export type BulkActionBarProps = { selectedCount: number onExport: () => void onDeselectAll: () => void customActions?: React.ReactNode showExport?: boolean } const BulkActionBar = forwardRef( ( { selectedCount, onExport, onDeselectAll, customActions, showExport = true, }, ref ) => { const tableToken = useResponsiveTokens('TABLE') const { breakPointLabel } = useBreakpoints(BREAKPOINTS) const isMobile = breakPointLabel === 'sm' const [drawerOpen, setDrawerOpen] = useState(false) if (selectedCount === 0) return null if (isMobile) { return ( {selectedCount} selected )} Deselect all {customActions && ( {customActions} )} ) } ) BulkActionBar.displayName = 'BulkActionBar' export default BulkActionBar