use super::MessageContext;
use trigger_codegen::handlers;

#[handlers]
mod workbench_module {
    pub async fn on_get_workbench_data(
        _context: &mut MessageContext<'_, '_>,
        _request: GetWorkbenchDataCsReq,
    ) -> GetWorkbenchDataScRsp {
        GetWorkbenchDataScRsp {
            retcode: 0,
            workbench_data: Some(WorkbenchData {
                workbench_app_list: vec![1, 2, 3, 4, 5],
                clue_data: Some(ClueData::default()),
            }),
        }
    }

    pub async fn on_get_partner_data(
        _context: &mut MessageContext<'_, '_>,
        _request: GetPartnerDataCsReq,
    ) -> GetPartnerDataScRsp {
        GetPartnerDataScRsp {
            retcode: 0,
            partner_data: Some(PartnerData::default()),
        }
    }

    pub async fn on_get_abyss_reward_data(
        _context: &mut MessageContext<'_, '_>,
        _request: GetAbyssRewardDataCsReq,
    ) -> GetAbyssRewardDataScRsp {
        GetAbyssRewardDataScRsp {
            retcode: 0,
            abyss_reward_data: Some(AbyssRewardData::default()),
        }
    }

    pub async fn on_unlock_clue_item(
        _context: &mut MessageContext<'_, '_>,
        _request: UnlockClueItemCsReq,
    ) -> UnlockClueItemScRsp {
        UnlockClueItemScRsp { retcode: 0 }
    }
}
