
import '../../../l10n_sdk.dart';

import '../../../l10n_sdk_method_channel.dart';
import '../../../l10n_sdk_platform_interface.dart';

import '../../data/datasources/l10n_sdk_method_channel_datasource.dart';
import '../../data/repositories/l10n_sdk_repository_impl.dart';

import 'l10n_sdk_core.dart';
import 'l10n_sdk_api_impl.dart';

class L10nSdkWiring
{
  static L10nSdkApi build() {

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

    // data layer
    final ds =  L10nSdkMethodChannelDataSource(platform);
    final repo =  L10nSdkRepositoryImpl(ds);
    final core =  L10nSdkCore(platform: platform, repo: repo,);

    return L10nSdkApiImpl(core: core);
  }
}
