"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
const CheckBox_1 = require("../../../components/CheckBox");
const HelpBlock_1 = tslib_1.__importDefault(require("../../../components/HelpBlock"));
const Flex_1 = require("../../../components/Flex");
const GridOptionsForm = (props) => {
    let { gridOptions } = props;
    return (React.createElement(Flex_1.Box, { className: "twa:p-2" },
        React.createElement(HelpBlock_1.default, null, "Grid Options"),
        React.createElement(FormLayout_1.default, { className: "twa:m-2", columns: [{ name: 'children' }, { name: 'label', style: { textAlign: 'start' } }] },
            React.createElement(FormLayout_1.FormRow, { label: "Enable Cell Selection" },
                React.createElement(CheckBox_1.CheckBox, { checked: !!gridOptions.cellSelection, onChange: (enableCellSelection) => {
                        gridOptions = { ...gridOptions, cellSelection: enableCellSelection };
                        props.onChangedGridOptions(gridOptions);
                    } })),
            React.createElement(FormLayout_1.FormRow, { label: "Show Filter Bar" },
                React.createElement(CheckBox_1.CheckBox, { checked: gridOptions.defaultColDef?.floatingFilter, onChange: (floatingFilter) => {
                        gridOptions = {
                            ...gridOptions,
                            defaultColDef: {
                                floatingFilter,
                            },
                        };
                        props.onChangedGridOptions(gridOptions);
                    } })),
            React.createElement(FormLayout_1.FormRow, { label: "Suppress Column Virtualisation" },
                React.createElement(CheckBox_1.CheckBox, { checked: gridOptions.suppressColumnVirtualisation, onChange: (suppressColumnVirtualisation) => {
                        gridOptions = {
                            ...gridOptions,
                            suppressColumnVirtualisation: suppressColumnVirtualisation,
                        };
                        props.onChangedGridOptions(gridOptions);
                    } })),
            React.createElement(FormLayout_1.FormRow, { label: "Show Column Menu Button" },
                React.createElement(CheckBox_1.CheckBox, { checked: gridOptions.suppressMenuHide, onChange: (suppressMenuHide) => {
                        gridOptions = { ...gridOptions, suppressMenuHide: suppressMenuHide };
                        props.onChangedGridOptions(gridOptions);
                    } })))));
};
exports.default = GridOptionsForm;
