import 'package:fluro/fluro.dart';
import 'package:liftmanager/internal/message/page/message_detail_page.dart';
import 'package:liftmanager/internal/message/page/message_list_page.dart';
import 'package:liftmanager/routers/router_init.dart';

class MessageRouter implements IRouterProvider{

  static String messageListPage = "/message/list";
  static String messageDetailPage = "/message/detail";

  @override
  void initRouter(FluroRouter router) {
    router.define(messageListPage, handler: Handler(handlerFunc: (_, params) => MessageListPage()));
    router.define(messageDetailPage, handler: Handler(handlerFunc: (_, params){
      String id = params["id"].first;
      return MessageDetailPage(id);
    }));
  }
}