import 'package:fluro/fluro.dart';
import 'package:liftmanager/internal/news/page/news_detail_page.dart';
import 'package:liftmanager/internal/news/page/news_list_page.dart';
import 'package:liftmanager/routers/router_init.dart';


class NewsRouter implements IRouterProvider{

  static String newsDetail = "/news/detail";
  static String newsTopList = "/news/top/list";

  @override
  void initRouter(FluroRouter router) {
    router.define(newsDetail, handler: Handler(handlerFunc: (_, params){
      String id = params["id"].first;
      return NewsDetailPage(id);
    }));
    router.define(newsTopList, handler: Handler(handlerFunc: (_, params){
      return NewsListPage();
    }));
  }

}