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();
    }
}
