"use strict";
const common_vendor = require("../../common/vendor.js");
if (!Array) {
  const _easycom_u_search2 = common_vendor.resolveComponent("u-search");
  const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon");
  (_easycom_u_search2 + _easycom_u_icon2)();
}
const _easycom_u_search = () => "../../node-modules/uview-plus/components/u-search/u-search.js";
const _easycom_u_icon = () => "../../node-modules/uview-plus/components/u-icon/u-icon.js";
if (!Math) {
  (_easycom_u_search + _easycom_u_icon)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "index",
  setup(__props) {
    var _a;
    (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
    const value = common_vendor.ref("");
    const list = common_vendor.ref([{ name: "本田" }]);
    const moreList = common_vendor.ref([{ name: "本田" }]);
    common_vendor.onShow(() => {
      search();
      toCustom();
    });
    const search = async () => {
    };
    const toChange = async () => {
    };
    const toCustom = async () => {
      value.value = "";
    };
    const toView = (item) => {
      common_vendor.index.navigateTo({
        url: `/pagesHome/search/index?type=${item.type || ""}`
      });
    };
    const toRest = async () => {
      console.log("重置");
    };
    const toDelete = async () => {
      console.log("删除");
    };
    return (_ctx, _cache) => {
      return common_vendor.e({
        a: common_vendor.o(toChange),
        b: common_vendor.o(toCustom),
        c: common_vendor.o(($event) => value.value = $event),
        d: common_vendor.p({
          shape: "square",
          ["show-action"]: true,
          ["action-text"]: "取消",
          placeholder: "想买什么车",
          modelValue: value.value
        }),
        e: !value.value && moreList.value.length > 0
      }, !value.value && moreList.value.length > 0 ? {
        f: common_vendor.p({
          size: "18px",
          name: "trash"
        }),
        g: common_vendor.o(toRest),
        h: common_vendor.f(moreList.value, (item, index, i0) => {
          return {
            a: common_vendor.t(item.name),
            b: common_vendor.o(($event) => toView(item), index),
            c: common_vendor.o(($event) => toDelete(), index),
            d: "2f32406a-2-" + i0,
            e: index
          };
        }),
        i: common_vendor.p({
          size: "15px",
          name: "close"
        })
      } : {
        j: common_vendor.f(list.value, (item, index, i0) => {
          return common_vendor.e({
            a: item.file
          }, item.file ? {
            b: item.file && item.file.length > 0 ? item.file[0].url : ""
          } : {
            c: "2f32406a-3-" + i0,
            d: common_vendor.p({
              size: "16px",
              name: "search"
            })
          }, {
            e: common_vendor.t(item.name),
            f: index,
            g: common_vendor.o(($event) => toView(item), index)
          });
        })
      });
    };
  }
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-2f32406a"], ["__file", "D:/project/赋强公证/notarization_applet/pagesHome/type/index.vue"]]);
wx.createPage(MiniProgramPage);
