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