import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'keyboard_android_method_channel.dart';

abstract class KeyboardAndroidPlatform extends PlatformInterface {
  /// Constructs a KeyboardAndroidPlatform.
  KeyboardAndroidPlatform() : super(token: _token);

  static final Object _token = Object();

  static KeyboardAndroidPlatform _instance = MethodChannelKeyboardAndroid();

  /// The default instance of [KeyboardAndroidPlatform] to use.
  ///
  /// Defaults to [MethodChannelKeyboardAndroid].
  static KeyboardAndroidPlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [KeyboardAndroidPlatform] when
  /// they register themselves.
  static set instance(KeyboardAndroidPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  Future<String?> getPlatformVersion() {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  Future<void> enableFloatingWindow(bool enable) {
    throw UnimplementedError(
      ' enableFloatingWindow(bool enable) has not been implemented.',
    );
  }

  Future<void> openInputMethodSettings() {
    throw UnimplementedError(
      'openInputMethodSettings() has not been implemented.',
    );
  }

  Future<bool> isTargetKeyboardEnabled() {
    throw UnimplementedError(
      'isTargetKeyboardEnabled() has not been implemented.',
    );
  }




  // /// 获取键映射（需要在 `MethodChannelKeyboardAndroid` 实现）
  // Future<List<Map<String, String>>> getKeyMappings() {
  //   throw UnimplementedError('getKeyMappings() has not been implemented.');
  // }
  //
  // /// 设置键映射（需要在 `MethodChannelKeyboardAndroid` 实现）
  // Future<bool> setKeyMappings(List<Map<String, String>> mappings) {
  //   throw UnimplementedError('setKeyMappings() has not been implemented.');
  // }
  //
  // /// 通过方法名获取动态文本
  // Future<String?> getDynamicText(String method) {
  //   throw UnimplementedError('getDynamicText() has not been implemented.');
  // }
}
