import{r as l,D as o,cl as d,cm as c,cn as m,J as s}from"./vendor-COicag8P.js";import{R as p}from"./index-IcoubmP7.js";import{bH as f}from"./LogPanel-BcMugwec.js";import"./helpers-BosuxZz1.js";import"./index-ClzsYCKK.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(f,{language:a,children:s.Children.map(r,i=>typeof i=="string"?i.trim():i)})})})};class x extends l.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(p,{settings:{language:"markdown",value:t,lineNumbers:"off"},onEditorInitialized:n}):o.jsx(d,{components:{code:h},remarkPlugins:[m],rehypePlugins:[c],children:t})})}}u(x,"defaultProps",{isEditing:!1,content:""});export{x as default};
//# sourceMappingURL=MarkdownEditor-CdTPlZEB.js.map
