import { observer } from 'mobx-react-lite' ; import styled , { css } from 'reshadow' ; import { useService } from '@cloudbeaver/core-di' ; import type { IDatabaseDataModel } from '../../../DatabaseDataModel/IDatabaseDataModel' ; import { TableFooterMenuItem } from './TableFooterMenuItem' ; import { TableFooterMenuService } from './TableFooterMenuService' ; const styles = css `
  menu-wrapper {
    display: flex;
    height: 100%;
  }
` ; interface Props { resultIndex : number ; model : IDatabaseDataModel < any , any > ; className ? : string ; } export const TableFooterMenu = observer < Props > ( function TableFooterMenu ( { resultIndex , model , className , } ) { const mainMenuService = useService ( TableFooterMenuService ) ; return styled ( styles ) ( < menu - wrapper className = { className } > { mainMenuService . constructMenuWithContext ( model , resultIndex ) . map ( ( topItem , i ) => ( < TableFooterMenuItem key = { i } menuItem = { topItem } / > ) ) } < /menu-wrapper>); } ) ;