import React from 'react';
import { observer } from 'mobx-react-lite';
import { LayoutSwitch } from '../LayoutSwitch';
export function _TableGridSwitch(props) {
    const { state, dragAndDrop, sections, ...restProps } = props;
    const tableSections = sections
        ? {
            TableSections: sections.TableSections,
            groupBy: sections.groupBy,
            renderSection: sections.renderSection,
            collapsible: sections.collapsible,
            events: sections.events,
        }
        : undefined;
    const gridSections = sections
        ? {
            GridSections: sections.GridSections,
            groupBy: sections.groupBy,
            renderSection: sections.renderSection,
        }
        : undefined;
    return (React.createElement(LayoutSwitch, { state: state, tableProps: {
            ...restProps,
            state: state.tableState,
            dragAndDrop: dragAndDrop?.table,
            sections: tableSections,
            sticky: true,
        }, gridProps: {
            ...restProps,
            state: state.gridState,
            dragAndDrop: dragAndDrop?.grid,
            sections: gridSections,
        } }));
}
export const TableGridSwitch = observer(_TableGridSwitch);
//# sourceMappingURL=TableGridSwitch.js.map