import 'package:design/design.dart';
import 'package:example/pages/store/store_design_spec.dart';
import 'package:guru_widgets/overlay/guru_asset_controller.dart';
import 'package:guru_popup/guru_popup.dart';
import 'package:guru_widgets/assetbar/guru_asset_bar.dart';

class StoreController extends GuruAssetOverlayController {
  final key1 = GlobalKey();
  final key2 = GlobalKey();
  StoreDesignSpec get designSpec => StoreDesignSpec.get();

  void showAssetsOverlay1() {
    final completer = GuruPopup.instance.showAssetsOverlay(director);
    startClaim(50,
        assetIcon: 'assets/images/ic_coin.png',
        scene: 'asset_overlay',
        key: key1,
        barSize: GuruAssetBarSizeSpec.s1, onCompleted: () {
      completer.complete();
    });
  }

  void showAssetsOverlay2() {
    final completer = GuruPopup.instance.showAssetsOverlay(director);
    startClaim(50,
        assetIcon: 'assets/images/ic_coin.png',
        scene: 'asset_overlay',
        key: key2, onCompleted: () {
      completer.complete();
    });
  }
}
