"use strict";
const gen_Apis = require("../../gen/Apis.js");
const ME_activities_list_model = require("./model.js");
require("../../common/libraries/request.js");
const common_store_useWeAppAuthStore = require("../../common/store/useWeAppAuthStore.js");
require("../../common/store/useWorkStore.js");
const common_libraries_apiLoading = require("../../common/libraries/apiLoading.js");
require("../../common/libraries/userUserLogin.js");
require("../../common/vendor.js");
common_store_useWeAppAuthStore.useWeAppAuthStore();
const getList = () => {
  var _a, _b;
  common_libraries_apiLoading.getApiLoading(gen_Apis.Apis.Activity.ActivityEnrolls.List, (_b = (_a = ME_activities_list_model.useModel) == null ? void 0 : _a.formData) == null ? void 0 : _b.value).then((res) => {
    ME_activities_list_model.useModel.listData.value = [...ME_activities_list_model.useModel.listData.value, ...res.data];
    ME_activities_list_model.useModel.metaData.value = res.meta;
    console.log(res);
  });
};
const method = {
  getList,
  loadMore(page) {
    ME_activities_list_model.useModel.formData.value.page = page;
    this.getList();
  },
  handleTabsChange(idx, res) {
    ME_activities_list_model.useModel.currentTabs.value = idx;
    ME_activities_list_model.useModel.formData.value = {
      page: 1,
      status: res == null ? void 0 : res.value
    };
    ME_activities_list_model.useModel.listData.value = [];
    getList();
    console.log(idx, "e");
  }
};
exports.method = method;
