import { jsx as _jsx } from "@emotion/react/jsx-runtime";
import { Select } from "@chakra-ui/react";
import React from "react";
import { useVariablesContext } from "@qorebase/app-component";
const VariablePropertyEditor = (props) => {
    const { variables } = useVariablesContext();
    const handleChange = React.useCallback((e) => {
        props.onChange(e.target.value);
    }, [props.onChange]);
    return (_jsx(Select, Object.assign({ size: "sm", value: props.value, placeholder: "Select from variable", onChange: handleChange }, { children: variables.map((variable) => (_jsx("option", Object.assign({ value: `@[${variable.id}](${variable.id})` }, { children: variable.display }), variable.id))) })));
};
export default VariablePropertyEditor;
//# sourceMappingURL=variable.js.map