"use strict";
const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js");
if (!Array) {
  const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
  _easycom_uni_popup2();
}
const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
if (!Math) {
  _easycom_uni_popup();
}
const _sfc_main = {
  __name: "daixjgk",
  setup(__props) {
    const warehouses = common_vendor.ref([
      { name: "XXXXX", address: "XXXXXXXXXX", capacity: "1500吨", rooms: "10个", emptyRooms: "5个", selected: false },
      { name: "XXXXX", address: "XXXXXXXXXX", capacity: "1500吨", rooms: "10个", emptyRooms: "5个", selected: false },
      { name: "XXXXX", address: "XXXXXXXXXX", capacity: "1500吨", rooms: "10个", emptyRooms: "5个", selected: false }
    ]);
    const toggleSelection = (index) => {
      warehouses.value[index].selected = !warehouses.value[index].selected;
    };
    const selectAll = () => {
      warehouses.value.forEach((warehouse) => {
        warehouse.selected = true;
      });
    };
    const confirmSelection = () => {
    };
    common_vendor.reactive({
      type: "center",
      msgType: "success",
      messageText: "这是一条成功提示",
      showClose: true
    });
    const popup = common_vendor.ref(null);
    const goFilterPage = () => {
      common_vendor.index.navigateTo({
        url: "/pages/filter/filter"
        // 注意路径前的斜杠
      });
    };
    return (_ctx, _cache) => {
      return {
        a: common_vendor.o(($event) => goFilterPage()),
        b: common_assets._imports_0$1,
        c: common_vendor.f(warehouses.value, (warehouse, index, i0) => {
          return {
            a: common_vendor.t(warehouse.name),
            b: common_vendor.t(warehouse.address),
            c: warehouse.selected,
            d: common_vendor.o(($event) => toggleSelection(index), index),
            e: common_vendor.t(warehouse.capacity),
            f: common_vendor.t(warehouse.rooms),
            g: common_vendor.t(warehouse.emptyRooms),
            h: common_vendor.t(warehouse.selected ? "1个" : "0个"),
            i: index
          };
        }),
        d: common_assets._imports_0$2,
        e: common_assets._imports_2$1,
        f: common_vendor.o(selectAll),
        g: common_vendor.o(confirmSelection),
        h: _ctx.type === "left" || _ctx.type === "right" ? 1 : "",
        i: common_vendor.sr(popup, "846eb3b4-0", {
          "k": "popup"
        }),
        j: common_vendor.o(_ctx.change),
        k: common_vendor.p({
          ["background-color"]: "#fff",
          ["border-radius"]: "10px 10px 0 0"
        })
      };
    };
  }
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-846eb3b4"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/daixjgk/daixjgk.js.map
