part of 'namida_channel.dart';

class _NamidaChannelWindows extends NamidaChannel {
  _NamidaChannelWindows._internal();

  @override
  bool get canOpenFileInExplorer => true;

  @override
  Future<void>? openFileInExplorer(String filePath, {bool isDirectory = false}) {
    return Process.start(
      'explorer.exe',
      isDirectory ? [filePath] : ['/select,', filePath],
      runInShell: true,
      mode: ProcessStartMode.normal,
    );
  }

  @override
  bool get supportsAppIcons => false;
  @override
  Future<bool?> isAppIconEnabled(NamidaAppIcons type) async {
    // -- unsupported
    return false;
  }

  @override
  Future<void> changeAppIcon(NamidaAppIcons type) async {
    // -- unsupported
  }

  @override
  Future<void> updatePipRatio({int? width, int? height}) async {
    // -- unsupported
  }

  @override
  Future<void> setCanEnterPip(bool canEnter) async {
    // -- unsupported
  }

  @override
  Future<void> showToast({
    required String message,
    required SnackDisplayDuration duration,
  }) async {
    // -- use in-app toast
    snackyy(message: message, displayDuration: duration);
  }

  @override
  Future<int> getPlatformSdk() async {
    return 1;
  }

  @override
  Future<bool> setMonoAudio(bool? enabled) async {
    // -- unsupported
    return false;
  }

  @override
  Future<bool> setMusicAs({required String path, required List<SetMusicAsAction> types}) async {
    // -- unsupported
    return false;
  }

  @override
  Future<bool> openSystemEqualizer(int? sessionId, {String? package}) async {
    // -- unsupported
    return false;
  }

  @override
  Future<bool> openNamidaSync(String backupFolder, String musicFoldersJoined) async {
    // -- unsupported natively
    return false;
  }
}
