import { overlay } from 'overlay-kit';
import { delay } from '~/shared/lib/delay';

export const DIALOG_LEAVE_ANIMATION_DURATION = 100;

export const closeDialog = (callback: () => void) => {
  overlay.closeAll();
  delay(DIALOG_LEAVE_ANIMATION_DURATION).then(callback);
};
