import{k as i,r as d,h as r,F as O,j as g,a1 as m}from"./vendor.e6eaca24.js";import{u as A}from"./index.c6944236.js";import{c as u,b as C,a as R}from"./CodeLanguage.24acdb11.js";let s=e=>{const t=A("code_language"),l=d.exports.useRef(new Map).current;function o(a){const n=e.language;l.set(n,e.compileAndRunOptions),e.onUpdateLanguage(a),e.onUpdateCompileAndRunOptions(l.get(a)||R(a))}return r(O,{children:[g(m.Select,{className:e.classNameForLanguage,label:e.headerForLanguage||t(".code_language"),value:e.language,options:Object.keys(u).map(a=>({key:a,value:a,text:t(`.${a}.name`)})),onChange:(a,{value:n})=>!e.pending&&o(n)}),e.elementAfterLanguageSelect,u[e.language].map(a=>{switch(a.type){case C.Select:return g(m.Select,{className:e.classNameForCompileAndRunOptions,label:t(`.${e.language}.options.${a.name}.name`),value:e.compileAndRunOptions[a.name],options:a.values.map(n=>({key:n,value:n,text:t(`.${e.language}.options.${a.name}.values.${n}`)})),onChange:(n,{value:c})=>!e.pending&&e.onUpdateCompileAndRunOptions(Object.assign({},e.compileAndRunOptions,{[a.name]:c}))},a.name)}})]})};s=i(s);var $=s;export{$ as C};
