"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[4516],{70048:(m,s,t)=>{t.d(s,{K:()=>E});var i=t(18690);function E(l){return(0,i.g)()}},99538:(m,s,t)=>{t.d(s,{T7:()=>y,TY:()=>P,tN:()=>g});var i=t(31085),E=t(6820),l=t(25862),c=t(43836),u=t(10602),f=t(14041);const h=(0,c.tK)("entity-context"),y=n=>{const{children:e,entity:o,loading:r,error:a,refresh:d}=n,v={entity:o,loading:r,error:a,refresh:d};return(0,i.jsx)(h.Provider,{value:(0,u.B)({1:v}),children:(0,i.jsx)(l.Ig,{attributes:{...o?{entityRef:(0,E.U2)(o)}:void 0},children:e})})},A=n=>_jsx(y,{entity:n.entity,loading:!n.entity,error:void 0,refresh:void 0,children:n.children});function g(){const n=(0,c.qO)("entity-context");if(!n)throw new Error("Entity context is not available");const e=n.atVersion(1);if(!e)throw new Error("EntityContext v1 not available");if(!e.entity)throw new Error("useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead.");return{entity:e.entity}}function P(){const n=(0,c.qO)("entity-context");if(!n)throw new Error("Entity context is not available");const e=n.atVersion(1);if(!e)throw new Error("EntityContext v1 not available");const{entity:o,loading:r,error:a,refresh:d}=e;return{entity:o,loading:r,error:a,refresh:d}}},54516:(m,s,t)=>{t.r(s),t.d(s,{CatalogEntityPage:()=>n});var i=t(31085),E=t(14041),l=t(18690),c=t(99538),u=t(70048),f=t(72427),h=t(39837),y=t(29207),A=t(7341),g=t(28966);const P=()=>{const{kind:e,namespace:o,name:r}=(0,u.K)(y.s),a=(0,l.Zp)(),d=(0,f.gf)(h.m),v=(0,f.gf)(A.v),{value:O,error:R,loading:x,retry:C}=(0,g.A)(()=>v.getEntityByRef({kind:e,namespace:o,name:r}),[v,e,o,r]);return(0,E.useEffect)(()=>{r||(d.post(new Error("No name provided!")),a("/"))},[d,a,R,x,O,r]),{entity:O,loading:x,error:R,refresh:C}};function n(){return(0,i.jsx)(c.T7,{...P(),children:(0,i.jsx)(l.sv,{})})}}}]);})();

//# sourceMappingURL=4516.3caab6a3.chunk.js.map