import 'package:diplomaticquarterapp/analytics/google-analytics.dart';

class AppNav{
  final name = 'app_nav';
  final GALogger logger;
  AppNav(this.logger);

  logNavName(String value){
    logger(name, parameters: {
      'nav_name' : value
    });
  }

  log({int tabIndex, bool isLoggedIn}){
    var nav_name = "";
    if(tabIndex == 1)
      nav_name = "medical file";
    if(tabIndex == 3)
      nav_name = "my family";
    if(tabIndex == 4)
      nav_name = "todo list";
    if(tabIndex == 5)
      nav_name = "help";

    if(nav_name.isNotEmpty)
      logger(name, parameters: {
        'nav_name' : nav_name
      });
  }
}