import 'package:cpt_auth/modules/select_role/select_role_state.dart';
import 'package:cpt_auth/modules/tenant_doc/tenant_doc_page.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';

part 'select_role_view_model.g.dart';

@riverpod
class SelectRoleViewModel extends _$SelectRoleViewModel {
  @override
  SelectRoleState build() {
    return SelectRoleState();
  }

  //进入下一步
  void submitRole() {
    TenantDocPage.startInstance();
  }

  //选择角色
  void selectRole(int index) {
    state = state.copyWith(selectedIndex: index);
  }
}
