import 'package:fluro/fluro.dart';
import 'package:liftmanager/internal/means/page/means_list.dart';
import 'package:liftmanager/internal/means/page/means_page.dart';
import 'package:liftmanager/internal/means/page/brand_list.dart';
import 'package:liftmanager/internal/means/page/brand_detail.dart';
import 'package:liftmanager/internal/means/page/control_list.dart';
import 'package:liftmanager/internal/means/page/error_list.dart';
import 'package:liftmanager/internal/means/page/error_detail.dart';
import 'package:liftmanager/internal/means/page/control_detail.dart';
// import 'package:liftmanager/internal/means/page/means_pdf.dart';

// import 'package:liftmanager/internal/team/page/team_list_page.dart';

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

class MeansRouter implements IRouterProvider {
  static String meansPage = "/means/meansPage";
  static String meansList = "/means/meansList";
  static String brandList = "/means/brandList";
  static String brandDetail = "/means/brandDetail";
  static String controlList = "/means/controlList";
  static String errorList = "/means/errorList";
  static String errorDetail = "/means/errorDetail";
  static String controlDetail = "/means/controlDetail";
  // static String meansPDF = "/means/meansPDF";

  // static String teamListPage = "/team/list";

  @override
  void initRouter(Router router) {
    // router.define(brandPage, handler: Handler(handlerFunc: (_, params){
    //   String index = params["index"].first;
    //   return BrandPage(index);
    // }));
    router.define(meansList, handler: Handler(handlerFunc: (_, params) {
      String catagoryId = params["catagoryId"].first;
      String dataTable = params["dataTable"].first;
      String brandId = params["brandId"].first;
      return MeansList(catagoryId, dataTable, brandId);
    }));
    router.define(meansPage,
        handler: Handler(handlerFunc: (_, params) => MeansPage()));
    // router.define(meansPDF, handler: Handler(handlerFunc: (_, params) => MeansPDF()));
    router.define(brandList,
        handler: Handler(handlerFunc: (_, params) => BrandList()));
    router.define(brandDetail, handler: Handler(handlerFunc: (_, params) {
      String id = params["id"].first;
      return BrandDetail(id);
    }));
    router.define(controlList,
        handler: Handler(handlerFunc: (_, params) => ControlList()));
    router.define(errorList, handler: Handler(handlerFunc: (_, params) {
      String id = params["id"].first;
      return ErrorList(id);
    }));
    router.define(errorDetail, handler: Handler(handlerFunc: (_, params) {
      String id = params["id"].first;
      return ErrorDetail(id);
    }));
    router.define(controlDetail, handler: Handler(handlerFunc: (_, params) {
      String id = params["id"].first;
      return ControlDetail(id);
    }));
  }
}
