1import{importShared as j}from"./__federation_fn_import-ByyHmTlD.js";import{j as d}from"./jsx-runtime-7cQtIZBq.js";import{p as r}from"./index-Dk74W0Oi.js";import T from"./__federation_expose_ComponentsFeatureGateUseFeature-vlj0EGJR.js";import{FeatureProvider as O}from"./__federation_expose_ComponentsFeatureGateFeatureContext-xphDtCx4.js";import R,{u as E}from"./__federation_expose_ComponentsFeatureGateUpgradeModal-fOd32UlK.js";import G from"./__federation_expose_ComponentsFeatureGateUpgradeGate-BmW7z5U9.js";import U from"./__federation_expose_HooksUseOrganisation-qTh0pRrr.js";import b from"./__federation_expose_HooksUseModuleInfo-DJwCQej2.js";import{DemoConnectModal as y}from"./__federation_expose_ComponentsFeatureGateDemoGate-Dj5Ln3xU.js";import F from"./__federation_expose_ComponentsAddonAddAddonModal-XF1pCW6W.js";import{M as i,f as q}from"./constants-Ck1lSa6s.js";const{useMemo:w}=await j("react"),B=({name:f,children:u,renderGate:c,upgradeType:m,upgradeText:A,onSuccess:l=()=>{},checkLimits:v,sharedLimitsName:x="",forceUpgradeModal:M=!1,moduleName:t=i.RECEIVABLES})=>{const e=T(f,v,x,t),{sandbox:n}=U(),{selectedModuleSubscription:o,moduleSubscriptions:g=[]}=b(t,{suspense:!1}),h=g.some(s=>s?.id!==i.ORGANISATION&&s?.isActive),p=t===i.ORGANISATION?!!o?.isActive&&h:o?.isActive||!1,a=E({cleanupOnUnmount:!1}),I=w(()=>({...e,hasAddons:e.hasAddons||!1,sandbox:n,onUpgrade:()=>{n?a(d.jsx(y,{})):p&&e.hasAddons&&!M?a(d.jsx(F,{feature:e,moduleName:t,addonId:q[e.name],onSuccess:l})):a(d.jsx(R,{moduleName:t}))}}),[e.enabled,e.canAccess,n,p,e.hasAddons,a,l,e.name]);return e.enabled?d.jsx(O,{value:I,children:d.jsx(G,{text:A,type:m,renderGate:c,children:u||null})}):null};B.propTypes={name:r.string.isRequired,children:r.node.isRequired,renderGate:r.func,upgradeType:r.string,upgradeText:r.string,forceUpgradeModal:r.bool};export{B as default}; 2//# sourceMappingURL=__federation_expose_ComponentsFeatureGateFeatureGate-Bro_CVQP.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.