import{d as k}from"./client-my5lks1i.js";import{k as f,l as g,n as C,Q as n,S as s,Y as d,U as t,F as a,ab as _,a5 as b}from"./vendor/json-editor-vue-gv8v06ez.js";const h=["innerHTML"],v={class:"shiki"},y=["textContent"],H=f({__name:"NCodeBlock",props:{code:{},lang:{},lines:{type:Boolean,default:!0},transformRendered:{}},emits:["loaded"],setup(c,{emit:i}){const o=c,p=i,l=g(()=>{const e=o.lang==="text"?{code:o.code,supported:!1}:k.value?.devtools.renderCodeHighlight(o.code,o.lang)||{code:o.code,supported:!1};return e.supported&&o.transformRendered&&(e.code=o.transformRendered(e.code)),e.supported&&C(()=>p("loaded")),e});return(e,r)=>e.lang&&l.value.supported?(n(),s("pre",{key:0,class:d(["n-code-block",e.lines?"n-code-block-lines":""]),innerHTML:l.value.code},null,10,h)):(n(),s("pre",{key:1,class:d(["n-code-block",e.lines?"n-code-block-lines":""])},[t("pre",v,[t("code",null,[(n(!0),s(a,null,_(e.code.split(`
`),(u,m)=>(n(),s(a,{key:m},[t("span",{class:"line",textContent:b(u)},null,8,y),r[0]||(r[0]=t("br",null,null,-1))],64))),128))])])],2))}});export{H as _};
