import{computed as e,inject as t,provide as n}from"vue";var r=Symbol(`PortalContextKey`),i=(t,i={inTriggerContext:!0})=>{n(r,{inTriggerContext:i.inTriggerContext,shouldRender:e(()=>{let{sPopupVisible:e,popupRef:n,forceRender:r,autoDestroy:i}=t||{},a=!1;return(e||n||r)&&(a=!0),!e&&i&&(a=!1),a})})},a=()=>{i({},{inTriggerContext:!1});let n=t(r,{shouldRender:e(()=>!1),inTriggerContext:!1});return{shouldRender:e(()=>n.shouldRender.value||n.inTriggerContext===!1)}};export{a as useInjectPortal,i as useProvidePortal};