
import '../../../media_sdk.dart';

import '../../../media_sdk_method_channel.dart';
import '../../../media_sdk_platform_interface.dart';

import '../../data/datasources/media_sdk_method_channel_datasource.dart';
import '../../data/repositories/media_sdk_repository_impl.dart';

import 'media_sdk_core.dart';
import 'media_sdk_api_impl.dart';

class MediaSdkWiring
{
  static MediaSdkApi build() {

    // platform instance（method channel）
    final platform = MediaSdkPlatform.instance;
    if (platform is MethodChannelMediaSdk) {
      // platform.init(); // or defer to NotificationApiImpl.init
    }

    // data layer
    final ds =  MediaSdkMethodChannelDataSource(platform);
    final repo =  MediaSdkRepositoryImpl(ds);
    final core =  MediaSdkCore(platform: platform, repo: repo,);

    return MediaSdkApiImpl(core: core);
  }
}
