import{E as e,F as t,Qt as n,W as r,Y as i,c as a,h as o,m as s,tn as c,v as l}from"./vendor/json-editor-vue-ddj4xtqm.js";import{t as u}from"./client-cbmkjf3j.js";var d=[`innerHTML`],f=[`textContent`],p=e({__name:`NCodeBlock`,props:{code:{},lang:{},lines:{type:Boolean,default:!0},inline:{type:Boolean},grammarContextCode:{},transformRendered:{}},emits:[`loaded`],setup(e,{emit:p}){let m=e,h=p,g=s(()=>{let e=m.lang===`text`?{code:m.code,supported:!1}:u.value?.devtools.renderCodeHighlight(m.code,m.lang,{grammarContextCode:m.grammarContextCode})||{code:m.code,supported:!1};return e.supported&&m.transformRendered&&(e.code=m.transformRendered(e.code)),e.supported&&t(()=>h(`loaded`)),e}),_=s(()=>[`n-code-block shiki`,m.lines&&!m.inline?`n-code-block-lines`:``]);return(t,s)=>e.lang&&g.value.supported?(r(),l(`pre`,{key:0,class:n(_.value)},[o(`code`,{innerHTML:g.value.code},null,8,d)],2)):(r(),l(`pre`,{key:1,class:n(_.value)},[o(`code`,null,[(r(!0),l(a,null,i(e.code.split(`
`),(e,t)=>(r(),l(a,{key:t},[o(`span`,{class:`line`,textContent:c(e)},null,8,f),s[0]||=o(`br`,null,null,-1)],64))),128))])],2))}}),m=Object.assign(p,{__name:`NCodeBlock`});export{m as t};