import{P as e}from"./vue-json-pretty.DEqWvEy3.js";import{M as t,aL as a,u as s,aw as r,s as o,bk as n,bb as l,q as u}from"./@vue.DbmRtknU.js";import{_ as p}from"./index.B5actdnS.js";const i={key:1,class:"json-pretty-fallback"},y=p(t({__name:"index",props:{value:{type:[String,Object,Array,Number,Boolean],default:""},height:{type:String,default:"240px"}},setup(t){const p=t,y=u(()=>{const e=p.value;if("string"==typeof e)try{return JSON.parse(e)}catch{return e}return e}),c=u(()=>"object"==typeof y.value&&null!==y.value),d=u(()=>{const e=p.value;return"string"==typeof e?e:JSON.stringify(e,null,2)});return(u,p)=>(a(),s("div",{class:"json-pretty-wrapper",style:r({maxHeight:t.height})},[c.value?(a(),o(n(e),{key:0,data:y.value,"show-line":!0,"show-icon":!0,"show-double-quotes":!1,"show-length":!0,deep:3},null,8,["data"])):(a(),s("pre",i,l(d.value),1))],4))}}),[["__scopeId","data-v-a0d23118"]]);export{y as J};