import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:tone_snap/modules/sideb/collect_playlists/collect_playlists_view.dart';
import 'package:tone_snap/modules/sideb/playlists/playlists_view.dart';
import 'package:tone_snap/routes/app_routes.dart';

class PersonalMusicLibraryController extends GetxController with GetSingleTickerProviderStateMixin {
  late TabController tabController;
  final labels = ['Playlists', 'Collect Playlists'];
  final pages = [const PlaylistsView(), const CollectPlaylistsView()];

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

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

  void onTapModule(int index) {
    if (index == 0) {
      Get.toNamed(AppRoutes.loveSongs);
    }
    if (index == 1) {
      Get.toNamed(AppRoutes.loveSongs);
    }
    if (index == 2) {
      Get.toNamed(AppRoutes.loveSongs);
    }
  }
}
