"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PropertyEditorVariableSelection = void 0;
const tslib_1 = require("tslib");
const jsx_runtime_1 = require("react/jsx-runtime");
const styled_components_1 = tslib_1.__importDefault(require("styled-components"));
const VariablePicker_1 = tslib_1.__importDefault(require("../VariablePicker"));
const PropertyEditorVariableSelection = (props) => {
    const path = Reflect.get(props.editObject, props.propertyName);
    return ((0, jsx_runtime_1.jsx)(PropertyEditorVariableSelectionRender, { children: (0, jsx_runtime_1.jsx)(VariablePicker_1.default, { selected: path, allowNewVariable: props.allowNew, onVariableSet: (newpath) => {
                Reflect.set(props.editObject, props.propertyName, newpath);
                props.updateCallback();
            }, data: props.inputDataFunction(), requiredType: props.expectedType.type, isList: props.expectedType.list }) }));
};
exports.PropertyEditorVariableSelection = PropertyEditorVariableSelection;
const PropertyEditorVariableSelectionRender = styled_components_1.default.div `
    display: flex;
    flex-direction: column;
    justify-content: center;
`;
//# sourceMappingURL=PropertyEditorVariableSelection.js.map