import 'package:flutter/cupertino.dart';
import 'package:guru_utils/ads/ads_delegate.dart';
import 'package:guru_utils/ads/data/ads_model.dart';
import 'package:guru_utils/ads/handler/ads_handler.dart';
import 'package:guru_utils/extensions/extensions.dart';

/// Created by Haoyi on 2023/2/9

abstract class AdsManagerDelegate {
  static late AdsManagerDelegate _delegate;

  static AdsManagerDelegate get instance => _delegate;

  @mustCallSuper
  AdsManagerDelegate() {
    _delegate = this;
  }

  Stream<bool> get observableInitialized;

  Stream<bool> get observableNoAds;

  bool get isPurchasedNoAd;

  Future<AdsDelegate> getInterstitialAds();

  Future<AdsDelegate> getRewardsAds();

  Future<AdsDelegate> createBannerAds({String? scene, AdsLifecycleObserver? observer});

  Future<AdCause> validateBanner(String? scene, {AdsValidator? validator});

  Future<AdCause> validateInterstitial(String? scene, {AdsValidator? validator});

  Future<AdCause> validateRewards(String? scene, {AdsValidator? validator});

  dynamic getConfig(String type);
}
