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

/// Defines Focus Flow Theme styling for the FocusFlow Flutter UI.
library;

import 'package:flutter/material.dart';

import 'focus_flow_tokens.dart';

/// Theme factory for the FocusFlow Flutter app.
abstract final class FocusFlowTheme {
  /// Builds the dark Material theme used by the desktop app.
  static ThemeData dark() {
    final scheme = ColorScheme.fromSeed(
      seedColor: FocusFlowTokens.accentMagenta,
      brightness: Brightness.dark,
    );
    return ThemeData(
      colorScheme: scheme,
      scaffoldBackgroundColor: FocusFlowTokens.appBackground,
      canvasColor: FocusFlowTokens.appBackground,
      dialogTheme: const DialogThemeData(
        backgroundColor: FocusFlowTokens.elevatedPanel,
      ),
      fontFamily: 'Roboto',
      textTheme: const TextTheme(
        headlineLarge: TextStyle(
          color: FocusFlowTokens.textPrimary,
          fontSize: FocusFlowTokens.pageTitleSize,
          fontWeight: FontWeight.w800,
        ),
        titleLarge: TextStyle(
          color: FocusFlowTokens.textPrimary,
          fontSize: FocusFlowTokens.cardTitleSize,
          fontWeight: FontWeight.w800,
        ),
        titleMedium: TextStyle(
          color: FocusFlowTokens.textPrimary,
          fontSize: 18,
          fontWeight: FontWeight.w700,
        ),
        bodyLarge: TextStyle(
          color: FocusFlowTokens.textPrimary,
          fontSize: 17,
          fontWeight: FontWeight.w500,
        ),
        bodyMedium: TextStyle(color: FocusFlowTokens.textMuted, fontSize: 15),
      ),
      useMaterial3: true,
    );
  }
}
