import 'package:fis_jsonrpc/services/dictionary.m.dart';
import 'package:vitalapp/managers/interfaces/dictionary.dart';
import 'package:vitalapp/rpc.dart';
import 'package:vitalapp/store/store.dart';

class DictionaryManager implements IDictionaryManager {
  DictionaryManager();

  @override
  Future<List<DictionaryWithUnitDTO>?> getDictionaryNameAndUnitByKeysAsync(
      List<String> keys) async {
    var request = GetDictionaryNameAndUnitByKeysRequest(
      keys: keys,
      token: Store.user.token,
    );
    var result =
        await rpc.dictionary.getDictionaryNameAndUnitByKeysAsync(request);
    return result;
  }
}
