import 'dart:collection';
import 'package:get/get.dart';
import 'package:vnoteapp/store/store.dart';

import 'models/menu.dart';

class HomeState {
  final RxList<HomeMenuItem> _menuItems = RxList.empty();

  /// 版本号
  String get version => "1.0.0.100";

  /// 医生名称
  String get doctorName => Store.user.displayName;

  /// 团队名称
  String get doctorTeamName => Store.user.teamName;

  /// 菜单项集合
  List<HomeMenuItem> get menuItems => UnmodifiableListView(_menuItems.toList());
  set menuItems(Iterable<HomeMenuItem> val) =>
      _menuItems.value = List<HomeMenuItem>.from(val).obs;
}
