import { Code, GripHorizontal } from 'lucide-react' import { DragEvent, PropsWithChildren, ReactNode } from 'react' import { cn, Tooltip, TooltipContent, TooltipTrigger } from 'ui' interface ReportBlockContainerProps { icon?: ReactNode label: string badge?: ReactNode actions: ReactNode loading?: boolean draggable?: boolean showDragHandle?: boolean tooltip?: ReactNode onDragStart?: (e: DragEvent) => void } export const ReportBlockContainer = ({ icon, label, badge, actions, loading = false, draggable = false, showDragHandle = false, tooltip, onDragStart, children, }: PropsWithChildren) => { const hasChildren = Array.isArray(children) ? children.filter(Boolean).filter((x) => !!x.props.children).length > 0 : !!children return (
{showDragHandle ? ( ) : icon ? ( icon ) : ( )}

{label}

{badge &&
{badge}
}
{actions}
{tooltip && ( {tooltip} )}
{children}
) }