"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConfigurationWizardColumnsStep = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const ColumnsList_1 = tslib_1.__importDefault(require("./ColumnsList"));
const ConfigurationWizardColumnsStep = (props) => {
    var _a, _b;
    let theme = 'light';
    if (typeof props.adaptableConfig.adaptableOptions.predefinedConfig === 'object' &&
        ((_a = props.adaptableConfig.adaptableOptions.predefinedConfig.Theme) === null || _a === void 0 ? void 0 : _a.CurrentTheme)) {
        theme = props.adaptableConfig.adaptableOptions.predefinedConfig.Theme.CurrentTheme;
    }
    return (React.createElement(ColumnsList_1.default, { theme: theme, handle: props.columnsHandle, onValidityChange: (valid) => {
            props.setPrimaryKeyIsNotSelected(valid);
        }, selectedColumns: props.selectedColumns, onChange: props.onColumnChange, onSelectionChange: props.onSelectionChange, columns: (_b = props.adaptableConfig.gridOptions) === null || _b === void 0 ? void 0 : _b.columnDefs }));
};
exports.ConfigurationWizardColumnsStep = ConfigurationWizardColumnsStep;
