import{n as l}from"./index-Ms_1iFoB.js";const c={name:"CCTreeView",props:{value:{type:[Object,Array],default:()=>({})},level:{type:Number,default:0}},data:()=>({items:[]}),watch:{value:{immediate:!0,handler(){Array.isArray(this.value)?this.items=this.value:(this.items=[],this.$nextTick(()=>{this.items=this.parseEntry(this.value)}))}}},methods:{parseEntry(a,e="root"){const n=[],s=[];this.openIds=[];for(const r in a)if(r==="tags")n.push({id:e,name:a.tags.join(" - "),children:s});else if(r==="message")for(const t in a.message){const i=a.message[t];s.push({id:`${e}.${t}`,name:`${t}`,value:typeof i=="string"?i.trimStart():i})}else if(r==="encapsulated")for(let t=0;t<a.encapsulated.length;t++){const i=a.encapsulated[t];s.push(...this.parseEntry(i,`${e}.encapsulated[${t}]`))}return n}}};var o=function(){var e=this,n=e._self._c;return e.items.length>0?n("v-treeview",{ref:"treeview",attrs:{"open-all":"",dense:"",items:e.items},scopedSlots:e._u([{key:"label",fn:function({item:s}){return[n("v-row",{staticClass:"ma-0 pa-0",attrs:{dense:""}},[n("strong",{staticClass:"tree-item-name",staticStyle:{"white-space":"pre-wrap"}},[e._v(e._s(s.name))]),s.value!==void 0?n("div",{staticClass:"tree-item-value",class:s.name==="payload"?"mono":"",staticStyle:{"white-space":"pre-wrap"}},[e._v(" "+e._s(s.value)+" ")]):e._e()])]}}],null,!1,184165539)}):e._e()},p=[],u=l(c,o,p,!1,null,"c9a56bc2");const d=u.exports;export{d as default};
