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

import 'ads_test_controller.dart';


class AdsTestPage extends GetWidget<AdsTestController> {
  final LeadingType leadingType;

  AdsTestPage(
      {Key? key,
      this.leadingType = LeadingType.close})
      : super(key: key) {
    Get.create<AdsTestController>(() => AdsTestController());
  }
  

  @override
  Widget build(BuildContext context) {
    return GuruSettingsPage(
      items: [
        GroupSetting(
          title: "TEST BANNER ADS",
          items: [
            EntranceSetting(title: "Pubmatic", onTap: () async {
              controller.showBanner();
            }), 
          ]
        ),
        GroupSetting(
          title: "TEST INTERSTITIAL ADS",
          items: [
            EntranceSetting(title: "Pubmatic", onTap: () async {
              controller.showInterstitialAd(scene: "test");
            }), 
            EntranceSetting(title: "Guru INTER2INTER", onTap: () async {

            })
          ]
        ),
        GroupSetting(
          title: "TEST REWARDS ADS",
          items: [
            EntranceSetting(title: "Pubmatic", onTap: () async {
              controller.showRewardedAd(scene: "test");
            })
          ]
        )
      ]
    );
  }
}
