import{d as k,u as p,c as t,e as d,r as _,g as o,o as b,f,w as s,k as n,aK as D,aL as h,h as B,ay as v,t as g}from"./index.647f6a83.js";import{u as w}from"./useRouteParam.58df0b75.js";import{u as y}from"./useSubscriptionWithDependencies.afeeaa8b.js";const I=k({__name:"BlockView",setup(C){const u=p(),c=w("blockDocumentId"),a=t(()=>c.value?[c.value]:null),l=y(v.getBlockDocument,a),e=t(()=>l.response),r=()=>{u.push(g.blocks())},m=t(()=>e.value?`Block: ${e.value.name}`:"Block");return d(m),(x,S)=>{const i=_("p-layout-default");return o(e)?(b(),f(i,{key:0,class:"block-view"},{header:s(()=>[n(o(D),{"block-document":o(e),onDelete:r},null,8,["block-document"])]),default:s(()=>[n(o(h),{"block-document":o(e)},null,8,["block-document"])]),_:1})):B("",!0)}}});export{I as default};
