"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[4516],{70048:function(m,s,t){t.d(s,{K:function(){return c}});var i=t(18690);function c(u){return(0,i.g)()}},99538:function(m,s,t){t.d(s,{T7:function(){return l},TY:function(){return P},tN:function(){return g}});var i=t(31085),c=t(6820),u=t(25862),E=t(43836),v=t(10602),f=t(14041);const h=(0,E.tK)("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.B)({1:y}),children:(0,i.jsx)(u.Ig,{attributes:{...o?{entityRef:(0,c.U2)(o)}:void 0},children:e})})},A=n=>_jsx(l,{entity:n.entity,loading:!n.entity,error:void 0,refresh:void 0,children:n.children});function g(){const n=(0,E.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,E.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:function(m,s,t){t.r(s),t.d(s,{CatalogEntityPage:function(){return n}});var i=t(31085),c=t(14041),u=t(18690),E=t(99538),v=t(70048),f=t(72427),h=t(39837),l=t(29207),A=t(7341),g=t(38282);const P=()=>{const{kind:e,namespace:o,name:r}=(0,v.K)(l.s),a=(0,u.Zp)(),d=(0,f.gf)(h.m),y=(0,f.gf)(A.v),{value:O,error:R,loading:x,retry:C}=(0,g.A)(()=>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,R,x,O,r]),{entity:O,loading:x,error:R,refresh:C}};function n(){return(0,i.jsx)(E.T7,{...P(),children:(0,i.jsx)(u.sv,{})})}}}]);})();

//# sourceMappingURL=4516.f764862f.chunk.js.map