// ignore_for_file: unnecessary_statements

import 'package:fis_jsonrpc/services/liveConsultation.m.dart';
import 'package:fis_jsonrpc/services/organization.dart';
import 'package:fis_jsonrpc/services/organization.m.dart';

class OrganizationServiceMock extends OrganizationService {
  OrganizationServiceMock(String host) : super(host);

  @override
  Future<List<OrganizationBaseDTO>> getParentOrganizationListAsync(
      GetParentOrganizationListRequest request) async {
    return super.getParentOrganizationListAsync(request);
    //   return [
    //     OrganizationBaseDTO(
    //       createTime: DateTime.now(),
    //       organizationCode: "mockParentCode001",
    //       organizationName: "mockParentName001",
    //     ),
    //     OrganizationBaseDTO(
    //       createTime: DateTime.now(),
    //       organizationCode: "mockParentCode002",
    //       organizationName: "mockParentName002",
    //     ),
    //     OrganizationBaseDTO(
    //       createTime: DateTime.now(),
    //       organizationCode: "mockParentCode003",
    //       organizationName: "mockParentName003",
    //     ),
    //   ];
  }

  @override
  Future<OrganizationBasicDTO> getPersonOrganizationAsync(
      GetPersonOrganizationRequest request) async {
    return super.getPersonOrganizationAsync(request);
    //return mockDb.currentOrganization ??= _createMockOrganization();
  }

  @override
  Future<bool> savePersonOrganizationAsync(
      SavePersonOrganizationRequest request) async {
    return super.savePersonOrganizationAsync(request);
    //  mockDb.currentOrganization = OrganizationBasicDTO(
    //     parentCode: request.parentCode,
    //     organizationCode: request.organizationCode,
    //     organizationName: request.organizationName,
    //     logoUrl: request.logoUrl,
    //     regionCode: request.regionCode,
    //     createTime: DateTime.now(),
    //   );
    //   return true;
  }

  OrganizationBasicDTO _createMockOrganization() {
    return OrganizationBasicDTO(
      createTime: DateTime.now(),
      organizationCode: "mock001",
      organizationName: "mockName001",
      logoUrl: "http://192.168.6.117:9001/Storage/1646630728147.jpeg",
      //logoUrl: "",
      parentCode: "mockParentCode001",
      regionCode: "532900",
    );
  }
}
