import{r as s,J as i,co as l,cq as d,V as u}from"./vendor-3e5e4180.js";import{bE as c,bp as m}from"./ControlType-c6badda7.js";import{r as f}from"./mathjax-d42af1a5.js";import"./helpers-de833af9.js";import"./index-4f862717.js";import"./monaco-b5248072.js";function a(e,r,t){return r=p(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function p(e){var r=g(e,"string");return typeof r=="symbol"?r:String(r)}function g(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var v=e=>{var{children:r,className:t}=e,n=t!=null&&t!==void 0&&t.startsWith("language-")?t.substring(9):"plaintext";return i.jsx("pre",{children:i.jsx("code",{children:i.jsx(m,{language:n,children:u.Children.map(r,o=>typeof o=="string"?o.trim():o)})})})};class h extends s.PureComponent{constructor(r){super(r),a(this,"container",void 0),this.container=null}render(){var{isEditing:r,content:t,onEditorInitialized:n}=this.props;return i.jsx("div",{className:"markdown-editor-container",ref:o=>{this.container=o},children:r?i.jsx(c,{settings:{language:"markdown",value:t,lineNumbers:"off"},onEditorInitialized:n}):i.jsx(l,{components:{code:v},remarkPlugins:[d],rehypePlugins:[f],children:t})})}}a(h,"defaultProps",{isEditing:!1,content:""});export{h as default};
//# sourceMappingURL=MarkdownEditor-139e1dec.js.map
