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