import 'package:fluro/fluro.dart';
import 'package:liftmanager/internal/sign/page/sign_add_page.dart';
import 'package:liftmanager/internal/sign/page/sign_list_page.dart';
import 'package:liftmanager/routers/router_init.dart';
import 'package:liftmanager/internal/sign/page/sign_page.dart';


class SignRouter implements IRouterProvider{

  static String signPage = "/sign";
  static String signListPage = "/sign/list";
  static String signAddPage = "/sign/add";

  @override
  void initRouter(Router router) {
    router.define(signPage, handler: Handler(handlerFunc: (_, params) => SignPage()));
    router.define(signListPage, handler: Handler(handlerFunc: (_, params) => SignListPage()));
    router.define(signAddPage, handler: Handler(handlerFunc: (_, params){
      String address = params["address"].first;
      String coordinate = params["coordinate"].first;
      String toptime = params["toptime"].first;
      String downtime = params["downtime"].first;
      String toptimepm = params["toptimepm"].first;
      String downtimepm = params["downtimepm"].first;
      String toptimeot = params["toptimeot"].first;
      String downtimeot = params["downtimeot"].first;
      return SignAddPage(address,coordinate,toptime,downtime,toptimepm,downtimepm,toptimeot,downtimeot);
    }));
  }
}