/**
 * @fileOverview actions for wrap navigation between views behing a platform
 * independant api. These action should be pretty dumb and only change the
 * route to be rendered in the user interface.
 */

class NavAction {
  constructor(store) {
    this._store = store;
  }

  goLoader() {
    this._store.route = 'Loader';
  }

  goSelectSeed() {
    this._store.route = 'SelectSeed';
  }

  goSeed() {
    this._store.route = 'Seed';
  }

  goSeedVerify() {
    this._store.route = 'SeedVerify';
  }

  goRestoreSeed() {
    this._store.route = 'RestoreSeed';
  }

  goSeedSuccess() {
    this._store.route = 'SeedSuccess';
  }

  goSetPassword() {
    this._store.route = 'SetPassword';
  }

  goSetPasswordConfirm() {
    this._store.route = 'SetPasswordConfirm';
  }

  goPassword() {
    this._store.route = 'Password';
  }

  goResetPasswordCurrent() {
    this._store.route = 'ResetPasswordCurrent';
  }

  goResetPasswordNew() {
    this._store.route = 'ResetPasswordNew';
  }

  goResetPasswordConfirm() {
    this._store.route = 'ResetPasswordConfirm';
  }

  goResetPasswordSaved() {
    this._store.route = 'ResetPasswordSaved';
  }

  goNewAddress() {
    this._store.route = 'NewAddress';
  }

  goLoaderSyncing() {
    this._store.route = 'LoaderSyncing';
  }

  goWait() {
    this._store.route = 'Wait';
  }

  goGovern() {
    this._store.route = 'Dao';
  }

  goHome() {
    this._store.route = 'Home';
  }

  goPay() {
    this._store.route = 'Pay';
  }

  goPoolAddLiquid() {
    this._store.route = 'PoolAddLiquid';
  }

  goPoolRemoveLiquid() {
    this._store.route = 'PoolRemoveLiquid';
  }

  goPayPoolConfirm() {
    this._store.route = 'PayPoolConfirm';
  }

  goPayLightningConfirm() {
    this._store.route = 'PayLightningConfirm';
  }

  goPayPoolDone() {
    this._store.route = 'PayPoolDone';
  }

  goPayLightningDone() {
    this._store.route = 'PayLightningDone';
  }

  goPaymentFailed() {
    this._store.route = 'PaymentFailed';
  }

  goPayBitcoin() {
    this._store.route = 'PayBitcoin';
  }

  goPayBitcoinConfirm() {
    this._store.route = 'PayBitcoinConfirm';
  }

  goPayBitcoinDone() {
    this._store.route = 'PayBitcoinDone';
  }

  goInvoice() {
    this._store.route = 'Invoice';
  }

  goInvoiceQR() {
    this._store.displayCopied = false;
    this._store.route = 'InvoiceQR';
  }

  goPoolRemLiqConf() {
    this._store.displayCopied = false;
    this._store.route = 'PoolRemLiqConf';
  }

  goChannels() {
    this._store.route = 'Channels';
  }

  goChannelDetail() {
    this._store.route = 'ChannelDetail';
  }

  goChannelDelete() {
    this._store.route = 'ChannelDelete';
  }

  goChannelCreate() {
    this._store.route = 'ChannelCreate';
  }

  goPoolAdd() {
    this._store.route = 'PoolAdd';
  }

  goURL(url) {
    // this._store.route = 'Transactions';
    window.open(url, '_blank');
  }

  goPromotions() {
    this._store.route = 'Promotions';
  }

  goTransactions() {
    this._store.route = 'Transactions';
  }

  goInvestments() {
    this._store.route = 'Investments';
  }

  goPools() {
    this._store.route = 'Pools';
  }

  goTransactionDetail() {
    this._store.route = 'TransactionDetail';
  }

  goPromotionDetail() {
    this._store.route = 'PromotionDetail';
  }

  goPoolDetail() {
    this._store.route = 'PoolDetail';
  }

  goNotifications() {
    this._store.unseenNtfnCount = 0;
    this._store.route = 'Notifications';
  }

  goContractSettings(contract) {
    this._store.selectedContractSetting = contract;
    this._store.route = 'SetContract';
  }

  goSettings() {
    this._store.route = 'Settings';
  }

  goSettingsUnit() {
    this._store.route = 'SettingsUnit';
  }

  goSettingsFiat() {
    this._store.route = 'SettingsFiat';
  }

  goCLI() {
    this._store.route = 'CLI';
  }

  goCreateChannel() {
    this._store.route = 'CreateChannel';
  }

  goDeposit() {
    this._store.displayCopied = false;
    this._store.route = 'Deposit';
  }
}

export default NavAction;
