"use strict";
const gen_Apis = require("../../gen/Apis.js");
const common_libraries_apiLoading = require("../../common/libraries/apiLoading.js");
const CUSTOMER_list_user_model = require("./model.js");
const getList = () => {
  var _a, _b;
  common_libraries_apiLoading.getApiLoading(gen_Apis.Apis.Archive.HouseOccupants.GetHouseOccupants, (_b = (_a = CUSTOMER_list_user_model.useModel) == null ? void 0 : _a.formData) == null ? void 0 : _b.value).then(
    (res) => {
      CUSTOMER_list_user_model.useModel.listData.value = [...CUSTOMER_list_user_model.useModel.listData.value, ...(res == null ? void 0 : res.data) || []];
      CUSTOMER_list_user_model.useModel.metaData.value = res == null ? void 0 : res.meta;
      console.log(res);
    }
  );
};
const method = {
  handleSearch() {
    CUSTOMER_list_user_model.useModel.formData.value.page = 1;
    CUSTOMER_list_user_model.useModel.listData.value = [];
    getList();
  },
  getList,
  handleLoad(page) {
    CUSTOMER_list_user_model.useModel.formData.value.page = page;
    getList();
  }
};
exports.method = method;
