import 'package:bart/bart/bart_bottombar_actions.dart';
import 'package:flutter/material.dart';

/// Restores the Bart bottom bar after leaving a home inner route.
void kasyShowBottomBar(BuildContext context) {
  WidgetsBinding.instance.addPostFrameCallback((_) {
    if (!context.mounted) {
      return;
    }
    Actions.invoke(context, BottomBarIntent.show());
  });
}

/// Hides the Bart bottom bar for home inner routes, including web reloads.
void kasyHideBottomBar(BuildContext context) {
  WidgetsBinding.instance.addPostFrameCallback((_) {
    if (!context.mounted) {
      return;
    }
    Actions.invoke(context, BottomBarIntent.hide());
  });
}
