import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
// (C) 2023-2026 GoodData Corporation
import { useCallback } from "react";
import { CodeLanguageSelect } from "./CodeLanguageSelect.js";
import { CodeOptions } from "./CodeOptions.js";
import { ComponentTypeSelect } from "./ComponentTypeSelect.js";
export function ReactOptions({ option, onChange }) {
    const onComponentTypeChanged = useCallback((componentType) => {
        const opt = { ...option, componentType };
        onChange(opt);
    }, [option, onChange]);
    const onLanguageChanged = useCallback((codeType) => {
        const opt = { ...option, codeType };
        onChange(opt);
    }, [option, onChange]);
    return (_jsxs(_Fragment, { children: [
            _jsx(ComponentTypeSelect, { selectedComponentType: option.componentType, onComponentTypeChanged: onComponentTypeChanged }), _jsx(CodeLanguageSelect, { selectedLanguage: option.codeType, onLanguageChanged: onLanguageChanged }), _jsx(CodeOptions, { option: option, onChange: onChange })
        ] }));
}
