"use strict";
const common_vendor = require("../../common/vendor.js");
require("../../store/index.js");
const common_assets = require("../../common/assets.js");
const store_modules_system = require("../../store/modules/system.js");
if (!Array) {
  const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon");
  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_icon2 + _easycom_up_tabs2 + _easycom_up_sticky2 + _easycom_custom_layout2)();
}
const _easycom_up_icon = () => "../../uni_modules/uview-plus/components/u-icon/u-icon.js";
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) {
  (_easycom_up_icon + _easycom_up_tabs + _easycom_up_sticky + _easycom_custom_layout)();
}
const _sfc_main = {
  __name: "index",
  setup(__props) {
    const store = store_modules_system.useSystemStore();
    const {
      bgColor
    } = common_vendor.storeToRefs(store);
    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: "运动"
      },
      {
        state: 7,
        name: "艺术"
      }
    ]);
    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 onFortune = () => {
      common_vendor.index.navigateTo({
        url: "/pages/fortune/index"
      });
    };
    const scrollTop = common_vendor.ref(0);
    const onScroll = (event) => {
      scrollTop.value = event;
    };
    return (_ctx, _cache) => {
      return {
        a: common_vendor.unref(common_assets.qing),
        b: common_vendor.p({
          ["custom-prefix"]: "iconfont",
          name: "icon-icon_aifilter",
          size: "30"
        }),
        c: common_vendor.p({
          ["custom-prefix"]: "iconfont",
          name: "icon-icon_picture",
          size: "30"
        }),
        d: common_vendor.p({
          ["custom-prefix"]: "iconfont",
          name: "icon-icon_next",
          size: "50rpx"
        }),
        e: common_vendor.p({
          ["custom-prefix"]: "iconfont",
          name: "icon-icon_cutout",
          color: "red",
          size: "30"
        }),
        f: common_vendor.p({
          ["custom-prefix"]: "iconfont",
          name: "icon-icon_next",
          size: "50rpx"
        }),
        g: common_vendor.p({
          list: tabs.value
        }),
        h: common_vendor.p({
          ["custom-prefix"]: "iconfont",
          name: "icon-huoyan",
          size: "34rpx",
          color: "rgba(237, 100, 100, 1)"
        }),
        i: common_vendor.p({
          name: "arrow-right",
          size: "24rpx"
        }),
        j: common_vendor.o(onFortune),
        k: common_vendor.p({
          ["offset-top"]: "0",
          ["customNav-height"]: "0",
          ["bg-color"]: scrollTop.value > 170 ? common_vendor.unref(bgColor) : ""
        }),
        l: common_vendor.f(dataList.value, (item, index, i0) => {
          return {
            a: index
          };
        }),
        m: common_vendor.sr(layout, "1cf27b2a-0", {
          "k": "layout"
        }),
        n: common_vendor.o(onQueryList),
        o: common_vendor.o(onScroll),
        p: common_vendor.o(($event) => dataList.value = $event),
        q: common_vendor.p({
          showBottom: true,
          back: {
            show: false,
            logoShow: true
          },
          modelValue: dataList.value
        })
      };
    };
  }
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-1cf27b2a"]]);
wx.createPage(MiniProgramPage);
