import { useRef, useEffect, h } from 'atomico';
import { g as getComponentOrDefine } from './chunks/65ef80fe.js';
import marked from 'marked';

var style = ":host {\n}\n";

const _jsxFileName = "/Users/rang/rang/frond_ng/packages/six/src/components/kun-page-markdown/kun-page-markdown.tsx";
const KunPageMarkdown = ({ content }) => {
  const ref = useRef();
  useEffect(() => {
    (ref.current ).innerHTML = marked(content || "");
  }, []);
  return (
    h('host', { shadowDom: true, __self: undefined, __source: {fileName: _jsxFileName, lineNumber: 14}}
      , h('style', {__self: undefined, __source: {fileName: _jsxFileName, lineNumber: 15}}, style)

      , h('div', {__self: undefined, __source: {fileName: _jsxFileName, lineNumber: 17}}
        , h('div', { ref: ref, __self: undefined, __source: {fileName: _jsxFileName, lineNumber: 18}} )
      )
    )
  );
};

KunPageMarkdown.props = {
  content: {
    type: String,
    value: "## h1 \n content\n",
    reflect: true,
    event: {
      type: "changeMessage",
    },
  },
};

var kunPageMarkdown = getComponentOrDefine("kun-page-markdown", KunPageMarkdown);

export default kunPageMarkdown;
