// SPDX-FileCopyrightText: 2026 FocusFlow contributors
// SPDX-License-Identifier: AGPL-3.0-only

part of '../../desktop_notification_adapter_stub.dart';

/// Create the best default desktop notification backend.
DesktopNotificationBackend createDefaultDesktopNotificationBackend({
  DesktopNotificationPlatform? platform,
  Object? processRunner,
  DesktopNotificationLogSink? logSink,
}) {
  final resolvedPlatform = platform ?? DesktopNotificationPlatform.unsupported;
  logger.info(() => 'Resolved stub desktop notification backend. '
      'platform=${resolvedPlatform.name} hasCustomRunner=${processRunner != null} '
      'hasCustomLogSink=${logSink != null}');
  return StdoutNotificationBackend(
    logSink: logSink ?? _defaultLogSink,
    platform: resolvedPlatform,
  );
}
