package com.gh.gamecenter.home.custom.eventlistener

import com.gh.gamecenter.common.entity.LinkEntity
import com.gh.gamecenter.entity.HomeSubSlide
import com.gh.gamecenter.entity.RatingComment
import com.gh.gamecenter.entity.SubjectEntity
import com.gh.gamecenter.feature.entity.GameEntity
import com.gh.gamecenter.feature.exposure.ExposureEvent
import com.gh.gamecenter.home.custom.model.CustomPageData
import com.gh.gamecenter.home.custom.model.CustomPageItem
import com.gh.gamecenter.home.custom.model.CustomSubjectCollectionItem

interface OnCustomPageEventListener {

    /**
     * 刷新
     */
    fun onRefresh()

    fun onLoadMore()

    fun onRetry()

    /**
     * 轮换刷新(专题合集/游戏单合集)
     */
    fun onRotateRefresh(customSubjectCollectionItem: CustomSubjectCollectionItem)

    /**
     * 换一批
     */
    fun onChangeABatch(subjectEntity: SubjectEntity)

    fun onChangeAppBarColor(color: Int)

    /**
     * 通过Game进入游戏详情
     */
    fun navigateToGameDetailPageByGame(
        item: CustomPageItem,
        childPosition: Int,
        game: GameEntity,
        text: String = "游戏"
    )

    /**
     * 点击游戏下载按钮
     */
    fun onDownloadButtonClick(item: CustomPageItem, childPosition: Int, game: GameEntity)

    /**
     * 点击进入游戏专题
     */
    fun navigateSubjectPage(item: CustomPageItem, subject: SubjectEntity)

    /**
     * 点击进入专题详情
     */
    fun navigateSubjectDetailPage(item: CustomSubjectCollectionItem, subject: CustomPageData.LinkColumnCollection.CustomSubjectEntity)


    /**
     * 跳转至专题合集
     */
    fun navigateSubjectCollectionPage(
        item: CustomSubjectCollectionItem,
        childPosition: Int,
        subject: CustomPageData.LinkColumnCollection.CustomSubjectEntity?
    )

    /**
     * 跳转至游戏单详情
     */
    fun navigateGameListDetailPage(
        item: CustomSubjectCollectionItem,
        childPosition: Int,
        subject: CustomPageData.LinkColumnCollection.CustomSubjectEntity
    )

    /**
     * 跳转至用户主页
     */
    fun navigateUserHomePage(item: CustomPageItem, userId: String)

    /**
     * 跳转至游戏偏好页
     */
    fun navigateToInterestedGamePage(item: CustomPageItem)

    /**
     * 跳转至猜你喜欢
     */
    fun navigateToDiscoveryPage(item: CustomPageItem)

    /**
     * 通过通用链接跳转页面
     */
    fun navigateToLinkPage(item: CustomPageItem, link: LinkEntity, text: String = "", exposureEvent: ExposureEvent?)

    /**
     * 跳转至安利墙
     */
    fun navigateToAmway(item: CustomPageItem)

    /**
     * 跳转至徽章墙
     */
    fun navigateToBadgeWall(item: CustomPageItem, comment: RatingComment)

    /**
     * 通过 gameId 跳转至游戏详情页
     */
    fun navigateToGameDetailPageById(item: CustomPageItem, gameId: String, gameName: String?, childPosition: Int)

    fun navigateToRatingReplyPage(item: CustomPageItem, gameId: String, commentId: String)

    fun navigateToCommonCollectionDetailPage(item: CustomPageItem, link: LinkEntity)

    /**
     * 跳转至游戏单合集详情
     */
    fun navigateGameListCollectionDetailPage(item: CustomSubjectCollectionItem)

    /**
     * 跳转至游戏单广场
     */
    fun navigateToGameListSquare(item: CustomSubjectCollectionItem)
}