import 'package:fis_jsonrpc/rpc.dart';
import 'package:vnoteapp/managers/interfaces/contract_template.dart';
import 'package:vnoteapp/rpc.dart';
import 'package:vnoteapp/store/store.dart';
import 'package:fis_common/logger/logger.dart';

class ContractTemplateManager implements IContractTemplateManager {
  @override
  Future<ContractTemplateDTO?> getContractTemplateDetail(String code) async {
    try {
      final result = await rpc.contractTemplate.getContractTemplateDetailAsync(
        GetContractTemplateRequest(code: code, token: Store.user.token),
      );
      print('object');
      print(result);
      print('object');
      return result;
    } catch (e) {
      logger.e("PatientManager query patient detail error.", e);
      return null;
    }
  }
}
