import * as React from 'react';
import FormLayout, { FormRow } from '../../../components/FormLayout';
import { CheckBox } from '../../../components/CheckBox';
import HelpBlock from '../../../components/HelpBlock';
import { Box } from '../../../components/Flex';
const GridOptionsForm = (props) => {
    let { gridOptions } = props;
    return (React.createElement(Box, { className: "twa:p-2" },
        React.createElement(HelpBlock, null, "Grid Options"),
        React.createElement(FormLayout, { className: "twa:m-2", columns: [{ name: 'children' }, { name: 'label', style: { textAlign: 'start' } }] },
            React.createElement(FormRow, { label: "Enable Cell Selection" },
                React.createElement(CheckBox, { checked: !!gridOptions.cellSelection, onChange: (enableCellSelection) => {
                        gridOptions = { ...gridOptions, cellSelection: enableCellSelection };
                        props.onChangedGridOptions(gridOptions);
                    } })),
            React.createElement(FormRow, { label: "Show Filter Bar" },
                React.createElement(CheckBox, { checked: gridOptions.defaultColDef?.floatingFilter, onChange: (floatingFilter) => {
                        gridOptions = {
                            ...gridOptions,
                            defaultColDef: {
                                floatingFilter,
                            },
                        };
                        props.onChangedGridOptions(gridOptions);
                    } })),
            React.createElement(FormRow, { label: "Suppress Column Virtualisation" },
                React.createElement(CheckBox, { checked: gridOptions.suppressColumnVirtualisation, onChange: (suppressColumnVirtualisation) => {
                        gridOptions = {
                            ...gridOptions,
                            suppressColumnVirtualisation: suppressColumnVirtualisation,
                        };
                        props.onChangedGridOptions(gridOptions);
                    } })),
            React.createElement(FormRow, { label: "Show Column Menu Button" },
                React.createElement(CheckBox, { checked: gridOptions.suppressMenuHide, onChange: (suppressMenuHide) => {
                        gridOptions = { ...gridOptions, suppressMenuHide: suppressMenuHide };
                        props.onChangedGridOptions(gridOptions);
                    } })))));
};
export default GridOptionsForm;
