import useAction from 'elementor-app/hooks/use-action'; import Button from './header-button'; export default function HeaderButtons( props ) { const action = useAction(); const actionOnClose = () => { if ( props.onClose ) { props.onClose(); } else { action.backToDashboard(); } }; let tools = ''; if ( props.buttons.length ) { const buttons = props.buttons.map( ( button ) => { return