import{r as d,I as o,cv as l,cx as m,U as s}from"./vendor-DVrAV4v1.js";import{b$ as c,bN as p}from"./ControlType-RBsIk8KS.js";import{r as f}from"./mathjax-DWeFhW7B.js";import"./helpers-BosuxZz1.js";import"./index-Cwc_E41j.js";import"./monaco-DaE0jI-i.js";function u(e,r,t){return(r=g(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function g(e){var r=v(e,"string");return typeof r=="symbol"?r:r+""}function v(e,r){if(typeof e!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var h=e=>{var{children:r,inline:t,className:n}=e;if(t===!0)return o.jsx("code",{children:s.Children.map(r,i=>typeof i=="string"?i.trim():i)});var a=n!=null&&n!==void 0&&n.startsWith("language-")?n.substring(9):"plaintext";return o.jsx("pre",{children:o.jsx("code",{children:o.jsx(p,{language:a,children:s.Children.map(r,i=>typeof i=="string"?i.trim():i)})})})};class x extends d.PureComponent{constructor(r){super(r),u(this,"container",void 0),this.container=null}render(){var{isEditing:r,content:t,onEditorInitialized:n}=this.props;return o.jsx("div",{className:"markdown-editor-container",ref:a=>{this.container=a},children:r?o.jsx(c,{settings:{language:"markdown",value:t,lineNumbers:"off"},onEditorInitialized:n}):o.jsx(l,{components:{code:h},remarkPlugins:[m],rehypePlugins:[f],children:t})})}}u(x,"defaultProps",{isEditing:!1,content:""});export{x as default};
//# sourceMappingURL=MarkdownEditor-CjiUT8XD.js.map
