import{useState as e,useEffect as n}from"react";import{v4 as r}from"uuid";import{useDcFullscreenElemsCoordinator as o}from"../components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";function t(t){var s=t.isOpen,i=e(!1),p=i[0],u=i[1],d=o(),c=d.requestOpen,l=d.requestClose,m=e((function(){return r()}))[0];return n((function(){s?c({setIsOpened:u,id:m}):l({setIsOpened:u,id:m})}),[s]),n((function(){return function(){l({setIsOpened:u,id:m},!0)}}),[]),{delayedIsOpen:p,requestOpen:function(){return c({setIsOpened:u,id:m})},requestClose:function(e){return l({setIsOpened:u,id:m},e)}}}export{t as useDelayedDcFullscreenElemOpen};
