import { Box } from '@mui/material' import type { WrapperActionsProps } from '../types' import { styles } from '../styles' const EMPTY_ACTIONS: NonNullable = [] /** * Renders action buttons in the widget wrapper header. Each action click event is stopped from propagating to the accordion. */ export function Actions({ actions = EMPTY_ACTIONS }: WrapperActionsProps) { return ( {actions.map((action, index) => { // Prefer action.key if present (React elements), else fallback to index const key = action && typeof action === 'object' && 'key' in action && action.key != null ? action.key : index return ( { e.stopPropagation() }} > {action} ) })} ) }