import 'package:app_business/service/abase.dart';
import 'package:app_business/service/api.dart';
import 'package:track_common/model/map_info.dart';
import 'package:track_common/view.dart';
import 'package:track_common/view/home/map/map_page.dart';

class MapPageControllerImpl extends MapPageController {
  ApiService get _api => Get.find();
  final HomeController home = Get.find();

  @override
  Future<List<MapInfo>> getMapList(int limit, int offset) {
    return _api.getMapList(limit, offset);
  }

  @override
  set selectedMap(MapInfo map) {
    home.selectMapName.value = map.name;
  }

  @override
  void afterTopMap() {
    home.tabController.index = 1;
  }
}
