import 'package:fluro/fluro.dart';
import 'package:liftmanager/internal/wode/page/order_master/punchin.dart';
import 'package:liftmanager/internal/wode/page/setting_page.dart';
import 'package:liftmanager/internal/wode/page/personal_page.dart';
import 'package:liftmanager/internal/wode/page/wallet/wallet_page.dart';
import 'package:liftmanager/internal/wode/page/wallet/small_money.dart';
import 'package:liftmanager/internal/wode/page/wallet/band_account.dart';
import 'package:liftmanager/internal/wode/page/coupon_page.dart';
import 'package:liftmanager/internal/wode/page/order/order_page.dart';
import 'package:liftmanager/internal/wode/page/order/order_detail.dart';
import 'package:liftmanager/internal/wode/page/order/buy_service.dart';
import 'package:liftmanager/internal/wode/page/order/comment.dart';
import 'package:liftmanager/internal/wode/page/order/representations.dart';
import 'package:liftmanager/internal/wode/page/order/kaipiao.dart';
import 'package:liftmanager/internal/wode/page/video/my_video.dart';
import 'package:liftmanager/internal/wode/page/video/video_detail.dart';
import 'package:liftmanager/internal/wode/page/video/video_upload.dart';
import 'package:liftmanager/internal/wode/page/piao/piao_list.dart';
import 'package:liftmanager/internal/wode/page/piao/piao_detail.dart';
import 'package:liftmanager/internal/wode/page/piao/piao_check.dart';
import 'package:liftmanager/internal/wode/page/piao/piao_order.dart';
import 'package:liftmanager/internal/wode/page/piao/piaotou.dart';
import 'package:liftmanager/internal/wode/page/piao/Piaotou_edit.dart';
import 'package:liftmanager/internal/wode/page/notice_list.dart';
import 'package:liftmanager/internal/wode/page/redbao_page.dart';
import 'package:liftmanager/internal/wode/page/collect_page.dart';
import 'package:liftmanager/internal/wode/page/master_become.dart';
import 'package:liftmanager/internal/wode/page/error_record_list.dart';
import 'package:liftmanager/internal/wode/page/error_record_detail.dart';

import 'package:liftmanager/internal/wode/page/order_master/order_page.dart';
import 'package:liftmanager/internal/wode/page/order_master/order_detail.dart';
import 'package:liftmanager/internal/wode/page/order_master/buy_service.dart';
import 'package:liftmanager/internal/wode/page/order_master/comment.dart';
import 'package:liftmanager/internal/wode/page/order_master/bao_price.dart';
import 'package:liftmanager/internal/wode/page/order_master/archive.dart';
import 'package:liftmanager/internal/wode/page/vip.dart';
import 'package:liftmanager/internal/wode/page/xieyi_list.dart';
import 'package:liftmanager/internal/wode/page/qrshare.dart';
import 'package:liftmanager/internal/wode/page/vip_Service.dart';
import 'package:liftmanager/internal/wode/page/piao/piao_center.dart';
import 'package:liftmanager/internal/wode/page/piao/piao_wait.dart';
import 'package:liftmanager/internal/wode/page/privilege.dart' as privilegeRouter;
import 'package:liftmanager/internal/wode/page/order_master/confirm_order.dart';
import 'package:liftmanager/internal/wode/page/theme_page.dart';

import 'package:liftmanager/routers/router_init.dart';

class WodeRouter implements IRouterProvider {
  static String settingPage = "/wode/setting";
  static String personalPage = "/wode/personal";
  static String walletPage = "/wode/walletPage";
  static String smallMoney = "/wode/smallMoney";
  static String couponPage = "/wode/couponPage";
  static String orderPage = "/wode/orderPage";
  static String orderDetail = "/wode/orderDetail";
  static String buyService = "/wode/buyService";
  static String representations = "/wode/representations";
  static String kaipiao = "/wode/kaipiao";
  static String comment = "/wode/comment";
  static String myVideo = "/wode/myVideo";
  static String videoDetail = "/wode/videoDetail";
  static String videoUpload = "/wode/videoUpload";
  static String piaoList = "/wode/piaoList";
  static String piaoDetail = "/wode/piaoDetail";
  static String piaoCheck = "/wode/piaoCheck";
  static String piaoOrder = "/wode/piaoOrder";
  static String piaotou = "/wode/piaotou";
  static String piaotouEdit = "/wode/piaotouEdit";
  static String noticeList = "/wode/noticeList";
  static String redbaoPage = "/wode/redbaoPage";
  static String collectPage = "/wode/collectPage";
  static String masterBecome = "/wode/masterBecome";

  static String orderPageMaster = "/wode/orderPageMaster";
  static String orderDetailMaster = "/wode/orderDetailMaster";
  static String buyServiceMaster = "/wode/buyServiceMaster";
  static String baoPrice = "/wode/baoPrice";
  static String commentMaster = "/wode/commentMaster";
  static String archive = "/wode/archive";
  static String vip = "/wode/vip";
  static String privilege = "/wode/privilege";
  static String piaoCenter = "/wode/piaoCenter";
  static String piaoWait = "/wode/piaoWait";
  static String punchin = "/wode/punchin";
  static String confirmOrder = "/wode/confirmOrder";
  static String qrshare = "/wode/qrshare";
  static String vipService = "/wode/vipService";
  static String bandAccount = "/wode/bandAccount";
  static String xieyiList = "/wode/xieyiList";
  static String errorRecordList = "/wode/error_record_list";
  static String errorRecordDetail = "/wode/error_record_detail";
  static String themePage = "/setting/theme";

  @override
  void initRouter(Router router) {
    router.define(themePage, handler: Handler(handlerFunc: (_, params) => ThemePage()));
    router.define(qrshare,
        handler: Handler(handlerFunc: (_, params) => Qrshare()));
    router.define(vipService, handler: Handler(handlerFunc: (_, params) {
      String id = params["id"].first;
      return VipService(id);
    }));
    router.define(errorRecordDetail, handler: Handler(handlerFunc: (_, params) {
      String id = params["id"].first;
      return ProductDetail(id);
    }));
    router.define(xieyiList,
        handler: Handler(handlerFunc: (_, params) => XieyiList()));
    router.define(errorRecordList,
        handler: Handler(handlerFunc: (_, params) => ProductList()));
    router.define(bandAccount,
        handler: Handler(handlerFunc: (_, params) => BandAccount()));
    router.define(piaoWait,
        handler: Handler(handlerFunc: (_, params) => PiaoWait()));
    router.define(piaoCenter,
        handler: Handler(handlerFunc: (_, params) => PiaoCenter()));
    
    router.define(settingPage, handler: Handler(handlerFunc: (_, params) {
      String indexNow = params["indexNow"].first;
      return SettingPage(indexNow);
    }));
    router.define(personalPage,
        handler: Handler(handlerFunc: (_, params) => PersonalPage()));
    router.define(walletPage,
        handler: Handler(handlerFunc: (_, params) => WalletPage()));
    router.define(smallMoney,
        handler: Handler(handlerFunc: (_, params) => SmallMoney()));
    router.define(couponPage,
        handler: Handler(handlerFunc: (_, params) => CouponPage()));
    router.define(orderPage, handler: Handler(handlerFunc: (_, params) {
      String checkType = params["checkType"].first;
      return OrderPage(checkType);
    }));
    router.define(buyService, handler: Handler(handlerFunc: (_, params) {
      String id = params["id"].first;
      return BuyService(id);
    }));
    router.define(comment, handler: Handler(handlerFunc: (_, params) {
      String id = params["id"].first;
      return Comment(id);
    }));
    router.define(representations, handler: Handler(handlerFunc: (_, params) {
      String id = params["id"].first;
      return Representations(id);
    }));

    router.define(kaipiao, handler: Handler(handlerFunc: (_, params) {
      String ids = params["ids"].first;
      String price = params["price"].first;
      return Kaipiao(ids,price);
    }));

    router.define(orderDetail, handler: Handler(handlerFunc: (_, params) {
      String id = params["id"].first;
      return OrderDetail(id);
    }));
    router.define(piaotouEdit, handler: Handler(handlerFunc: (_, params) {
      String type = params["type"].first;
      String id = params["id"].first;
      return PiaotouEdit(type, id);
    }));
    router.define(noticeList,
        handler: Handler(handlerFunc: (_, params) => NoticeList()));
    router.define(redbaoPage,
        handler: Handler(handlerFunc: (_, params) => RedbaoPage()));
    router.define(collectPage,
        handler: Handler(handlerFunc: (_, params) => CollectPage()));
    router.define(piaoList,
        handler: Handler(handlerFunc: (_, params) => PiaoList()));
    router.define(piaoDetail, handler: Handler(handlerFunc: (_, params) {
      String id = params["id"].first;
      return PiaoDetail(id);
    }));
    router.define(piaoCheck,
        handler: Handler(handlerFunc: (_, params) => PiaoCheck()));
    router.define(piaoOrder, handler: Handler(handlerFunc: (_, params) {
      String id = params["id"].first;
      return PiaoOrder(id);
    }));
    router.define(piaotou, handler: Handler(handlerFunc: (_, params) {
      String checkTou = params["checkTou"].first;
      String type = params["type"].first;
      return Piaotou(checkTou,type);
    }));
    router.define(myVideo,
        handler: Handler(handlerFunc: (_, params) => MyVideo()));
    router.define(videoDetail, handler: Handler(handlerFunc: (_, params) {
      String id = params["id"].first;
      return VideoDetail(id);
    }));

    router.define(masterBecome,
        handler: Handler(handlerFunc: (_, params) => MasterBecome()));

    router.define(videoUpload, handler: Handler(handlerFunc: (_, params) {
      String id = params["id"].first;
      return VideoUpload(id);
    }));
    //专家
    router.define(orderPageMaster, handler: Handler(handlerFunc: (_, params) {
      String checkType = params["checkType"].first;
      return OrderPageMaster(checkType);
    }));
    router.define(orderDetailMaster, handler: Handler(handlerFunc: (_, params) {
      String id = params["id"].first;
      return OrderDetailMaster(id);
    }));
    router.define(baoPrice, handler: Handler(handlerFunc: (_, params) {
      String id = params["id"].first;
      String travelCost = params["travelCost"].first;
      String serviceCost = params["serviceCost"].first;
      return BaoPrice(id,travelCost,serviceCost);
    }));
    router.define(archive, handler: Handler(handlerFunc: (_, params) {
      String id = params["id"].first;
      return Archive(id);
    }));
    router.define(vip, handler: Handler(handlerFunc: (_, params) {
      String id = params["id"].first;
      return Vip(id);
    }));
    router.define(privilege, handler: Handler(handlerFunc: (_, params) {
      String id = params["id"].first;
      return privilegeRouter.Privilege(id);
    }));
    router.define(punchin, handler: Handler(handlerFunc: (_, params) {
      String id = params["id"].first;
      return Punchin(id);
    }));
    router.define(confirmOrder, handler: Handler(handlerFunc: (_, params) {
      String id = params["id"].first;
      return ConfirmOrder(id);
    }));
  }
}
