import 'package:betting/data/model/res/teams/teams.dart';
import 'package:betting/view/mobile/favourites_view/teams/teams_screen_controller.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

class TeamInfoController extends GetxController
    with SingleGetTickerProviderMixin {
  late TabController tabController;
  List<String> tabTitles = [
    "Overview",
    "Matches",
    "Tables",
    "News",
    "Squad",
    "Videos",
    "Player Stats",
    "Team Stats",
  ];

  RxBool isFavourite = false.obs;
  RxList<Map<String, dynamic>> popupItem = [
    {
      'id': 0,
      'icon': Icons.star_border_rounded,
      'nameItem': 'Unfavourite this team',
    },
    {
      'id': 1,
      'icon': Icons.notifications_off_outlined,
      'nameItem': 'Mute match notifications',
      'isAllowNotifications': true
    },
    {
      'id': 2,
      'icon': Icons.notifications_off_outlined,
      'nameItem': 'Mute news notifications',
      'isAllowNotifications': true
    }
  ].obs;

  var itemTeam = ItemTeams().obs;

  final teamController = Get.find<TeamsScreenController>();

  @override
  void onInit() {
    tabController = TabController(length: 8, vsync: this);
    super.onInit();

    var data = Get.arguments;

    if(data != null){
      itemTeam.value = data;
    }
  }

  @override
  void onClose() {
    tabController.dispose();
    super.onClose();
  }
}
