/// Debug tools launcher for art and asset inspection screens.
library;

import 'package:flutter/material.dart';
import 'package:wolf_3d_flutter/wolf_3d_flutter.dart';
import 'package:wolf_3d_gui/screens/audio_gallery.dart';
import 'package:wolf_3d_gui/screens/sprite_gallery.dart';
import 'package:wolf_3d_gui/screens/vga_gallery.dart';

/// Presents debug-only navigation shortcuts for asset galleries.
class DebugToolsScreen extends StatelessWidget {
  /// Shared app facade used to access active game assets.
  final Wolf3d wolf3d;

  /// Creates the debug tools screen for [wolf3d].
  const DebugToolsScreen({super.key, required this.wolf3d});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Debug Tools'),
        automaticallyImplyLeading: true,
      ),
      body: ListView(
        padding: const EdgeInsets.all(16),
        children: [
          const Text(
            'Asset Galleries',
            style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
          ),
          const SizedBox(height: 12),
          Card(
            child: ListTile(
              leading: const Icon(Icons.library_music),
              title: const Text('Audio Gallery'),
              subtitle: const Text('Browse and test SFX and music tracks.'),
              trailing: const Icon(Icons.chevron_right),
              onTap: () {
                Navigator.of(context).push(
                  MaterialPageRoute(
                    builder: (_) => AudioGallery(wolf3d: wolf3d),
                  ),
                );
              },
            ),
          ),
          Card(
            child: ListTile(
              leading: const Icon(Icons.image_search),
              title: const Text('Sprite Gallery'),
              subtitle: const Text('Browse decoded sprite frames.'),
              trailing: const Icon(Icons.chevron_right),
              onTap: () {
                Navigator.of(context).push(
                  MaterialPageRoute(
                    builder: (_) => SpriteGallery(wolf3d: wolf3d),
                  ),
                );
              },
            ),
          ),
          Card(
            child: ListTile(
              leading: const Icon(Icons.photo_library),
              title: const Text('VGA Gallery'),
              subtitle: const Text('Browse decoded VGA images.'),
              trailing: const Icon(Icons.chevron_right),
              onTap: () {
                Navigator.of(context).push(
                  MaterialPageRoute(
                    builder: (_) => VgaGallery(wolf3d: wolf3d),
                  ),
                );
              },
            ),
          ),
        ],
      ),
    );
  }
}
