//Repository Impl

import 'package:networks_sdk/src/data/dto/api_requestable.dart';
import 'package:networks_sdk/src/presentation/wiring/api_config.dart';

import '../../domain/repositories/networks_sdk_repository.dart';
import '../datasources/networks_sdk_method_channel_datasource.dart';

class NetworksSdkRepositoryImpl implements NetworksSdkRepository
{
  final NetworksSdkMethodChannelDataSource _datasource;

  const NetworksSdkRepositoryImpl(this._datasource);

  @override
  Future<String?> platformVersion() {
    return _datasource.getPlatformVersion();
  }

  @override
  void initialize(ApiConfig apiConfig){
     _datasource.initialize(apiConfig);
  }

  @override
  Future<T?> executeRequest<T>(ApiRequestable<T> request) {
    return _datasource.executeRequest(request);
  }
}
