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,aL as D,aM as B,h,az as v,t as g}from"./index.c3b9a55d.js";import{u as w}from"./useRouteParam.b592fab0.js";import{u as C}from"./useSubscriptionWithDependencies.3dc092ce.js";const I=k({__name:"BlockView",setup(x){const u=p(),c=w("blockDocumentId"),a=t(()=>c.value?[c.value]:null),l=C(v.getBlockDocument,a),e=t(()=>l.response),r=()=>{u.push(g.blocks())},m=t(()=>e.value?`Block: ${e.value.name}`:"Block");return d(m),(y,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(B),{"block-document":o(e)},null,8,["block-document"])]),_:1})):h("",!0)}}});export{I as default};
