import { useContext } from 'react';
import { DashboardSidebarContext } from '../../../DashboardSidebarProvider';
import { usePopoverAnimation } from '../../../usePopoverAnimation';
export const useLogic = ({ isOpen }) => {
    const { popoverAnchorRef } = useContext(DashboardSidebarContext);
    const topPosition = popoverAnchorRef.current?.offsetTop;
    const { shouldRender, handleAnimationEnd } = usePopoverAnimation(isOpen);
    return { handleAnimationEnd, shouldRender, topPosition };
};
