package com.tenlionsoft.baselib.core.widget.base;

import com.alibaba.android.arouter.launcher.ARouter;
import com.tenlionsoft.baselib.constant.PathConfig;

/**
 * 生成fragment的工具类
 */
public class FragmentUtils {


    public static BaseFragment getUserCenterFragment() {
        BaseFragment fragment = (BaseFragment) ARouter.getInstance().build(PathConfig.PATH_MODULE_COMMON_FRAGMENT_USER_CENTER).navigation();
        return fragment;
    }

    public static BaseFragment getGridMainFragment() {
        BaseFragment fragment = (BaseFragment) ARouter.getInstance().build(PathConfig.PATH_MODULE_MAIN_FRAGMENT_GRID).navigation();
        return fragment;
    }

    public static BaseFragment getLeaderMainFragment() {
        BaseFragment fragment = (BaseFragment) ARouter.getInstance().build(PathConfig.PATH_MODULE_MAIN_FRAGMENT_LEADER).navigation();
        return fragment;
    }

    public static BaseFragment getSupervisionMainFragment() {
        BaseFragment fragment = (BaseFragment) ARouter.getInstance().build(PathConfig.PATH_MODULE_MAIN_FRAGMENT_SUPERVISION).navigation();
        return fragment;
    }

    public static BaseFragment getFragment(String path) {
        BaseFragment fragment = (BaseFragment) ARouter.getInstance().build(path).navigation();
        return fragment;
    }
}
