"use strict";
const common_vendor = require("../../common/vendor.js");
require("../../store/index.js");
const store_modules_system = require("../../store/modules/system.js");
if (!Array) {
  const _easycom_up_tabs2 = common_vendor.resolveComponent("up-tabs");
  const _easycom_up_sticky2 = common_vendor.resolveComponent("up-sticky");
  const _easycom_custom_layout2 = common_vendor.resolveComponent("custom-layout");
  (_easycom_up_tabs2 + _easycom_up_sticky2 + _easycom_custom_layout2)();
}
const _easycom_up_tabs = () => "../../uni_modules/uview-plus/components/u-tabs/u-tabs.js";
const _easycom_up_sticky = () => "../../uni_modules/uview-plus/components/u-sticky/u-sticky.js";
const _easycom_custom_layout = () => "../../components/custom-layout/custom-layout.js";
if (!Math) {
  (fortuneInfo + _easycom_up_tabs + _easycom_up_sticky + _easycom_custom_layout)();
}
const fortuneInfo = () => "./components/fortuneInfo.js";
const _sfc_main = {
  __name: "fortune",
  setup(__props) {
    const store = store_modules_system.useSystemStore();
    const {
      bgColor
    } = common_vendor.storeToRefs(store);
    common_vendor.ref(1);
    const tabs = common_vendor.ref([
      {
        state: -1,
        name: "热门新款"
      },
      {
        state: 1,
        name: "简约"
      },
      {
        state: 2,
        name: "卡通"
      },
      {
        state: 3,
        name: "复古"
      },
      {
        state: 4,
        name: "运动"
      },
      {
        state: 5,
        name: "艺术"
      },
      {
        state: 6,
        name: "节日"
      }
    ]);
    common_vendor.ref(-1);
    const dataList = common_vendor.ref([{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]);
    const num = common_vendor.ref(1);
    const layout = common_vendor.ref();
    const onQueryList = (event) => {
      const {
        pageNo,
        pageSize
      } = event;
      if (pageNo > 1) {
        if (num.value < 2) {
          num.value++;
          layout.value.complete(dataList.value);
        } else {
          layout.value.complete([]);
        }
      } else {
        num.value = 2;
        layout.value.complete(dataList.value);
      }
    };
    const scrollTop = common_vendor.ref(0);
    const onScroll = (event) => {
      scrollTop.value = event;
    };
    common_vendor.onMounted(() => {
    });
    return (_ctx, _cache) => {
      return {
        a: common_vendor.o(_ctx.click),
        b: common_vendor.p({
          list: tabs.value
        }),
        c: common_vendor.p({
          ["offset-top"]: "0",
          ["customNav-height"]: "0",
          ["bg-color"]: scrollTop.value > 170 ? common_vendor.unref(bgColor) : ""
        }),
        d: common_vendor.f(dataList.value, (item, index, i0) => {
          return {
            a: index
          };
        }),
        e: common_vendor.sr(layout, "35adc31d-0", {
          "k": "layout"
        }),
        f: common_vendor.o(onQueryList),
        g: common_vendor.o(onScroll),
        h: common_vendor.o(($event) => dataList.value = $event),
        i: common_vendor.p({
          showBottom: true,
          title: "启运",
          modelValue: dataList.value
        })
      };
    };
  }
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-35adc31d"]]);
wx.createPage(MiniProgramPage);
