import 'package:hmg_patient_app/uitl/utils.dart';

class _Event {
  String? name;
  String? description;
  bool? active;
  _Event(dynamic map) {
    if (map != null) {
      name = map['name'];
      description = map['description'];
      active = map['active'];
    }
  }

  flutterName() => 'f: $name';
}

class AnalyticEvents {
  static _Event get(String key) {
    var e = _Event(mapping[key]);
    if (e == null) {
      var label = labelFrom(
          className:
              key); //  Convert Class Name in to Label (HomeCare -> Home Care)
      e = _Event({"name": label, "active": true, "description": key});
    }
    return e;
  }

  static var mapping = const {
    "HomeHealthCarePage": {
      "active": true,
      "name": "Home Health Care Page",
      "description": "",
    },
    "SplashScreen": {
      "active": true,
      "name": "Splash Screen",
      "description": "",
    },
    "LandingPage": {
      "active": true,
      "name": "Landing Page",
      "description": "",
    },
    "WelcomeLogin": {
      "active": true,
      "name": "Welcome Login",
      "description": "",
    },
    "LoginType": {
      "active": true,
      "name": "Login Type",
      "description": "",
    },
    "Login": {
      "active": true,
      "name": "Login",
      "description": "",
    },
    "ForgotPassword": {
      "active": true,
      "name": "Forgot Password",
      "description": "",
    },
    "": {
      "active": true,
      "name": "",
      "description": "",
    },
  };
}
