import{taggedTemplateLiteral as e,slicedToArray as r}from"../../_virtual/_rollupPluginBabelHelpers.esm.js";import{useState as n}from"react";import o from"../../node_modules/@uiw/react-codemirror/esm/index.esm.js";import{javascript as i}from"../../node_modules/@codemirror/lang-javascript/dist/index.esm.js";import{sql as s}from"../../node_modules/@codemirror/lang-sql/dist/index.esm.js";import{java as t}from"../../node_modules/@codemirror/lang-java/dist/index.esm.js";import{python as d}from"../../node_modules/@codemirror/lang-python/dist/index.esm.js";import{html as m}from"../../node_modules/@codemirror/lang-html/dist/index.esm.js";import{css as a}from"../../node_modules/@codemirror/lang-css/dist/index.esm.js";import{cpp as l}from"../../node_modules/@codemirror/lang-cpp/dist/index.esm.js";import{json as c}from"../../node_modules/@codemirror/lang-json/dist/index.esm.js";import{xml as p}from"../../node_modules/@codemirror/lang-xml/dist/index.esm.js";import{markdown as u}from"../../node_modules/@codemirror/lang-markdown/dist/index.esm.js";import f from"styled-components";import x from"../../_virtual/index.esm.js";import{jsx as g,jsxs as h}from"react/jsx-runtime";var j,v,_,b,y,w;function T(e){var f=e.codeType,x=e.onChange,j=e.value,v=e.theme,_=e.label,b=e.required,y=e.name,w=n(!1),T=r(w,2);T[0];var A=T[1];return g(k,{children:h(q,{tabIndex:"0",onFocus:function(){A(!0)},onBlur:function(){A(!1)},children:[h(B,{children:[h(C,{children:[_,b&&"*"]}),g(P,{children:f})]}),g(z,{children:g(o,{value:j,onChange:function(e){x({target:{name:y,value:e}})},extensions:function(){switch(f){case"javascript":return[i()];case"sql":return[s()];case"java":return[t()];case"python":return[d()];case"html":return[m()];case"css":return[a()];case"cpp":return[l()];case"json":return[c()];case"xml":return[p()];case"markdown":return[u()];default:return[]}}(),theme:v||"light"})})]})})}T.PropTypes={codeType:x.oneOf(["javascript","sql","java","python","html","css","cpp","json","xml","markdown"])};var k=f.div(j||(j=e(["\n  min-height: 54px;\n  border: 1px solid rgb(202, 202, 202);\n  border-radius: 5px;\n  display: flex;\n  align-items: center;\n  /* justify-content: center; */\n  /* text-align: center; */\n  cursor: pointer;\n  transition: background 0.3s ease;\n  color: rgb(102, 102, 102);\n\n  &:hover {\n    border-color: rgb(33, 33, 33);\n  }\n\n  &:focus-within {\n    border: 2px solid rgb(25, 118, 210);\n  }\n"]))),q=f.div(v||(v=e(["\n  width: 100%;\n"]))),B=f.div(_||(_=e(["\n  display: flex;\n  flex-direction: row;\n"]))),C=f.div(b||(b=e(["\n  display: flex;\n  margin-left: 13px;\n  flex: 1;\n"]))),P=f.div(y||(y=e(["\n  margin-right: 13px;\n  font-size: 15px;\n"]))),z=f.div(w||(w=e(["\n  margin-bottom: 5px;\n"])));export{T as default};
//# sourceMappingURL=CodeInputComponent.esm.js.map
