export default {
  getCampaignList: state => state.campaignList,
  getCampaignOptions: state => {
    let result = []
    state.campaignList.forEach(campaign => {
      result.push({
        id: campaign.id,
        name: campaign.name,
      })
    })
    return result
  },
  getMemberCampaignReportData: state => state.memberCampaignReport,
  getMemberCampaignReportColumns: state => state.memberCampaignReportColumns,
  getMemberCampaignReportFootnotes: state => state.memberCampaignReportFootnotes,
  getCwScheduleList: state => state.cwScheduleList,
  getCwScheduleListPast: state => state.cwScheduleListPast,
  getWeeklyBonusStatementData: state => state.weeklyBonusStatementData,
  getAuthorizedReportList: state => state.authorizedReportListData,
  getCwScheduleDetails: state => cwId => {
    let weekList = state.cwScheduleList.find(function(week) {
      if (week.id === cwId) {
        return week
      }
    })
    return weekList
  },
  getAnnualIncomeStatementData: state => state.annualIncomeStatementData,
  getWelcomeBonusDailyData: state => state.welcomeBonusDailyData,
}
