package com.cooleshow.base.utils.helper;

import com.alibaba.android.arouter.launcher.ARouter;
import com.cooleshow.base.common.WebConstants;
import com.cooleshow.base.router.RouterPath;

/**
 * Author by pq, Date on 2022/5/10.
 */
public class WebStartHelper {
    /**
     * 开启音乐人认证页面
     */
    public static void startMusicPersonCertPage(){
        ARouter.getInstance().build(RouterPath.WebCenter.ACTIVITY_HTML)
                .withString(WebConstants.WEB_URL, WebConstants.TEACHER_MUSIC_PERSON_CERT)
                .navigation();
    }

    /**
     * 开启达人认证页面
     */
    public static void startCertPage(){
        ARouter.getInstance().build(RouterPath.WebCenter.ACTIVITY_HTML)
                .withString(WebConstants.WEB_URL, WebConstants.TEACHER_CERT)
                .navigation();
    }

    /**
     * 开启上传乐谱页面
     */
    public static void startUploadSheetMusicPage(){
        ARouter.getInstance().build(RouterPath.WebCenter.ACTIVITY_HTML)
                .withString(WebConstants.WEB_URL, WebConstants.TEACHER_UPLOAD_SHEET_MUSIC)
                .navigation();
    }


    /**
     * 打开曲谱详情页
     * * @param id
     */
    public static void startAccompany(String id){
        ARouter.getInstance().build(RouterPath.WebCenter.ACTIVITY_ACCOMPANY_HTML)
                .withString("url", String.format(WebConstants.SCORE_DETAIL_PAGE, id))
                .withBoolean("isHideTitle", true)
                .withBoolean("statusBarTextColor", true)
                .withBoolean("isOpenLight", true)
                .withInt("orientation", 0)
                .navigation();
    }

    /**
     * 打开用户协议页面
     */
    public static void startUserPrivacy(){
        ARouter.getInstance()
                .build(RouterPath.WebCenter.ACTIVITY_HTML)
                .withString(WebConstants.WEB_URL, WebConstants.REGISTRATION_AGREEMENT)
                .navigation();
    }

    /**
     * 打开隐私协议页面
     */
    public static void startPrivacy(){
        ARouter.getInstance()
                .build(RouterPath.WebCenter.ACTIVITY_HTML)
                .withString(WebConstants.WEB_URL, WebConstants.PRIVACY_AGREEMENT)
                .navigation();
    }

    /**
     * 打开交易记录页面
     */
    public static void startTradeRecord(){
        ARouter.getInstance()
                .build(RouterPath.WebCenter.ACTIVITY_HTML)
                .withString(WebConstants.WEB_URL, WebConstants.TRADE_RECORD_PAGE)
                .navigation();
    }

    /**
     * 打开推广计划页面
     */
    public static void startPromotePlanPage(){
        ARouter.getInstance()
                .build(RouterPath.WebCenter.ACTIVITY_HTML)
                .withString(WebConstants.WEB_URL, WebConstants.PROMOTE_PLAN_PAGE)
                .navigation();
    }

    /**
     * 热门专辑
     */
    public static void startHotAlbum(){
        ARouter.getInstance()
                .build(RouterPath.WebCenter.ACTIVITY_HTML)
                .withString(WebConstants.WEB_URL, WebConstants.STUDENT_MUSIC_ALBUM)
                .navigation();
    }

    /**
     * 打开专辑详情页
     * @param id
     */
    public static void startHotAlbumDetail(String id){
        ARouter.getInstance()
                .build(RouterPath.WebCenter.ACTIVITY_HTML)
                .withString(WebConstants.WEB_URL, WebConstants.STUDENT_MUSIC_ALBUM_DETAIL + id)
                .navigation();
    }

    /**
     * 热门曲目
     */
    public static void startHotMusicSheetList(){
        ARouter.getInstance()
                .build(RouterPath.WebCenter.ACTIVITY_HTML)
                .withString(WebConstants.WEB_URL, WebConstants.HOT_MUSIC_SHEET_LIST)
                .navigation();
    }

    /**
     * 热门曲目
     */
    public static void startGoodMusicSheetList(){
        ARouter.getInstance()
                .build(RouterPath.WebCenter.ACTIVITY_HTML)
                .withString(WebConstants.WEB_URL, WebConstants.GOOD_MUSIC_SHEET_LIST)
                .navigation();
    }

    /**
     * 打开隐私协议页面
     */
    public static void startSearch(){
        ARouter.getInstance()
                .build(RouterPath.WebCenter.ACTIVITY_HTML)
                .withString(WebConstants.WEB_URL, WebConstants.SEARCH_PAGE)
                .navigation();
    }


    /**
     * 打开优惠券
     */
    public  static void startCouponsPage(){
        ARouter.getInstance()
                .build(RouterPath.WebCenter.ACTIVITY_HTML)
                .withString(WebConstants.WEB_URL, WebConstants.COUPONS_PAGE)
                .navigation();
    }

    /**
     * 打开联系我们
     */
    public  static void startContactUs(){
        ARouter.getInstance()
                .build(RouterPath.WebCenter.ACTIVITY_HTML)
                .withString(WebConstants.WEB_URL, WebConstants.CONTACT_US_PAGE)
                .navigation();
    }

    /**
     * 打开我的收藏(我的乐谱)
     */
    public static void startMineFavorite(){
        ARouter.getInstance()
                .build(RouterPath.WebCenter.ACTIVITY_HTML)
                .withString(WebConstants.WEB_URL, WebConstants.MINE_MUSIC_SHEET)
                .navigation();
    }

    /**
     * 打开实名认证的协议地址
     */
    public static void startCertProtocol(){
        ARouter.getInstance()
                .build(RouterPath.WebCenter.ACTIVITY_HTML)
                .withString(WebConstants.WEB_URL, WebConstants.CERT_PROTOCOL_URL)
                .navigation();
    }

    /**
     * 打开领奖地址
     */
    public static void startAwardPage(){
        ARouter.getInstance()
                .build(RouterPath.WebCenter.ACTIVITY_HTML)
                .withString(WebConstants.WEB_URL, WebConstants.AWARD_URL)
                .navigation();
    }
}
