import 'package:fis_jsonrpc/rpc.dart';
import 'package:flyinsono/pages/remedical/consultation/widgets/muti_select.dart';
import 'package:flyinsono/views/desktop/real_time_consultation/widgets/simple_Info.dart';
import 'package:fis_common/event/event_type.dart';

abstract class IUserInfoManager {
  ///获取用户信息
  Future<UserDTO> getUserInfoAsync();

  ///分页查询组织信息
  Future<List<OrganizationDTO>> searchOrganizationsAsync(
      {String keyword = '',
      String parentShortCode = '',
      int pageIndex = 1,
      int pageSize = 50});

  ///根据组织和岗位身份查询用户列表信息(分页)
  Future<List<SimpleInfoItem>> getUserPages({
    required String organizationCode,
    required List<String> roleCodes,
    int pageIndex = 1,
    String? keyword,
    int pageSize = 100,
  });

  ///根据短码查询组织信息
  Future<OrganizationDTO> queryOrganizationsByShortCodeAsync(
      {required String shortCode});

  ///根据用户编码获取详情
  Future<UserInfoByCodeDTO> getUserByCode(String userCode);

  ///获取组织详情
  Future<OrganizationDTO> getOrganizationByCode(String orgCode);

  ///获取医院列表
  Future<PageCollection<OrganizationSimplifyDTO>>
      getOrganizationByUserAndDevices({
    int pageIndex = 1,
    int pageSize = 100,
    bool isIncloudReferral = true,
    String? keyword,
    bool onlyOrganization = false,
  });

  ///获取医院列表选择项
  Future<List<FMutiSelectModel>> getSelectOrganizations({
    int pageIndex = 1,
    int pageSize = 100,
    bool isIncloudReferral = true,
    String? keyword,
    bool onlyOrganization = false,
  });

  ///获取个人设备列表
  Future<PageCollection<SelectItemDTO>> getPersonDeviceDropdownPage({
    List<String>? restrictOrgCodes,
    int index = 1,
    int pageSize = 100,
    String? keyword,
    bool isIncloudReferral = true,
  });

  ///获取个人设备列表选择项
  Future<List<FMutiSelectModel>> getSelectPersonDevices({
    List<String>? restrictOrgCodes,
    int index = 1,
    int pageSize = 100,
    String? keyword,
    bool isIncloudReferral = true,
  });
}
