"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[8951],{61811:function(g,s,t){t.d(s,{O:function(){return c}});var i=t(73557);function c(u){return(0,i.UO)()}},96641:function(g,s,t){t.d(s,{X2:function(){return P},h$:function(){return l}});var i=t(52322),c=t(74314),u=t(72388),E=t(29651),v=t(68993),f=t(2784);const h=(0,E.CT)("entity-context"),l=n=>{const{children:e,entity:o,loading:r,error:a,refresh:d}=n,y={entity:o,loading:r,error:a,refresh:d};return(0,i.jsx)(h.Provider,{value:(0,v.E)({1:y}),children:(0,i.jsx)(u.fC,{attributes:{...o?{entityRef:(0,c.eE)(o)}:void 0},children:e})})},C=n=>_jsx(l,{entity:n.entity,loading:!Boolean(n.entity),error:void 0,refresh:void 0,children:n.children});function P(){const n=(0,E.Vt)("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 O(){const n=useVersionedContext("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}}},78951:function(g,s,t){t.r(s),t.d(s,{CatalogEntityPage:function(){return n}});var i=t(52322),c=t(2784),u=t(73557),E=t(96641),v=t(61811),f=t(44394),h=t(58513),l=t(36434),C=t(88624),P=t(77446);const O=()=>{const{kind:e,namespace:o,name:r}=(0,v.O)(l.w),a=(0,u.s0)(),d=(0,f.h_)(h.V),y=(0,f.h_)(C.A),{value:A,error:m,loading:x,retry:R}=(0,P.Z)(()=>y.getEntityByRef({kind:e,namespace:o,name:r}),[y,e,o,r]);return(0,c.useEffect)(()=>{r||(d.post(new Error("No name provided!")),a("/"))},[d,a,m,x,A,r]),{entity:A,loading:x,error:m,refresh:R}};function n(){return(0,i.jsx)(E.h$,{...O(),children:(0,i.jsx)(u.j3,{})})}}}]);})();

//# sourceMappingURL=8951.1fe70f2a.chunk.js.map