import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
// (C) 2022-2025 GoodData Corporation
import { useCallback } from "react";
import { FormattedMessage } from "react-intl";
/**
 * @internal
 */
export function CodeLanguageSelect({ selectedLanguage, onLanguageChanged }) {
    const onCheck = useCallback((e) => {
        const value = e.target.value;
        onLanguageChanged(value);
    }, [onLanguageChanged]);
    return (_jsxs("div", { className: "embed-insight-dialog-lang-selector", children: [
            _jsx("strong", { className: "bottom-space", children: _jsx(FormattedMessage, { id: "embedInsightDialog.code.language.codeAs" }) }), _jsxs("label", { className: "input-radio-label bottom-space s-language-ts", children: [
                    _jsx("input", { type: "radio", className: "input-radio", value: "ts", checked: selectedLanguage === "ts", onChange: onCheck }), _jsx("span", { className: "input-label-text", children: "TypeScript" })
                ] }), _jsxs("label", { className: "input-radio-label bottom-space s-language-js", children: [
                    _jsx("input", { type: "radio", className: "input-radio", value: "js", checked: selectedLanguage === "js", onChange: onCheck }), _jsx("span", { className: "input-label-text", children: "JavaScript" })
                ] })
        ] }));
}
