import 'package:flutter/material.dart';
import 'package:guru_widgets/appbar/guru_app_bar.dart';
import 'package:guru_widgets/pages/settings/guru_settings_page.dart';

/// Created by Haoyi on 2023/6/28

class GuruDebugPage extends StatelessWidget {
  final LeadingType leadingType;
  final List<SettingItem>? items;
  final VoidCallback? onEnterGameDebug;
  final VoidCallback? onEnterDataViewer;
  final VoidCallback? onEnterAdsDebug;
  final VoidCallback? onEnterAssetsDebug;
  final VoidCallback? onEnterDialogDebug;
  final VoidCallback? onEnterAccountDebug;
  final VoidCallback? onEnterTestSuit;

  const GuruDebugPage(
      {Key? key,
      this.leadingType = LeadingType.close,
      this.items,
      this.onEnterGameDebug,
      this.onEnterDataViewer,
      this.onEnterAdsDebug,
      this.onEnterAssetsDebug,
      this.onEnterDialogDebug,
      this.onEnterAccountDebug,
      this.onEnterTestSuit})
      : super(key: key);


  @override
  Widget build(BuildContext context) {
    return GuruSettingsPage(
      leadingType: leadingType,
      subpage: true,
      items: [
        EntranceSetting(
          title: "Game Debug", 
          // leading: Assets.imagesIcAds, 
          // trailing: Assets.imagesIcArrowRight,
          onTap: onEnterGameDebug
        ),
        EntranceSetting(
          title: "Data Viewer", 
          // leading: Assets.imagesIcAds, 
          // trailing: Assets.imagesIcArrowRight,
          onTap: onEnterDataViewer
        ),
        EntranceSetting(
          title: "Ads Debug", 
          // leading: Assets.imagesIcAds, 
          // trailing: Assets.imagesIcArrowRight,
          onTap: onEnterAdsDebug
        ),
        EntranceSetting(
          title: "Assets Debug", 
          // leading: Assets.imagesIcAds, 
          // trailing: Assets.imagesIcArrowRight,
          onTap: onEnterAssetsDebug
        ),
        EntranceSetting(
          title: "Dialog Debug", 
          // leading: Assets.imagesIcAds, 
          // trailing: Assets.imagesIcArrowRight,
          onTap: onEnterDialogDebug
        ),
        EntranceSetting(
          title: "Account Debug", 
          // leading: Assets.imagesIcAds, 
          // trailing: Assets.imagesIcArrowRight,
          onTap: onEnterAccountDebug
        ),
        EntranceSetting(
          title: "Test Suit", 
          // leading: Assets.imagesIcAds, 
          // trailing: Assets.imagesIcArrowRight,
          onTap: onEnterTestSuit
        ),
        ...?items,
      ]
    );
  }
}