"use strict";
const common_vendor = require("../../common/vendor.js");
if (!Array) {
  const _easycom_uni_collapse_item2 = common_vendor.resolveComponent("uni-collapse-item");
  const _easycom_uni_collapse2 = common_vendor.resolveComponent("uni-collapse");
  (_easycom_uni_collapse_item2 + _easycom_uni_collapse2)();
}
const _easycom_uni_collapse_item = () => "../../uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.js";
const _easycom_uni_collapse = () => "../../uni_modules/uni-collapse/components/uni-collapse/uni-collapse.js";
if (!Math) {
  (headerInput + _easycom_uni_collapse_item + _easycom_uni_collapse + listView)();
}
const headerInput = () => "../../components/headerInput.js";
const listView = () => "../../components/listView.js";
const _sfc_main = {
  __name: "addressBook",
  setup(__props) {
    const keyWord = common_vendor.ref("");
    const list = common_vendor.ref([
      {
        id: 1,
        title: "一年级(103)",
        children: [
          {
            id: "1-1",
            title: "1班(30)"
          },
          {
            id: "1-2",
            title: "2班(36)"
          },
          {
            id: "1-3",
            title: "3班(37)"
          }
        ]
      },
      {
        id: 2,
        title: "二年级(110)",
        children: [
          {
            id: "2-1",
            title: "1班(37)"
          },
          {
            id: "2-2",
            title: "2班(36)"
          },
          {
            id: "2-3",
            title: "3班(37)"
          }
        ]
      }
    ]);
    const searchList = common_vendor.ref([
      {
        id: 1,
        name: "李商隐",
        number: 6262662
      },
      {
        id: 2,
        name: "张三",
        number: 6266662
      },
      {
        id: 3,
        name: "李四",
        number: 6862662
      },
      {
        id: 4,
        name: "王五",
        number: 8262662
      }
    ]);
    const collapseRefs = common_vendor.ref([]);
    common_vendor.onLoad(() => {
    });
    const setItemRef = (el) => {
      collapseRefs.value.push(el);
    };
    const handleClick = (index) => {
      common_vendor.nextTick$1(() => {
        collapseRefs.value[index].resize();
      });
    };
    const goPage = (url) => {
      common_vendor.index.navigateTo({
        url
      });
    };
    const changeInputValue = (data) => {
      keyWord.value = data;
    };
    return (_ctx, _cache) => {
      return common_vendor.e({
        a: common_vendor.o(changeInputValue),
        b: !keyWord.value
      }, !keyWord.value ? {} : {}, {
        c: !keyWord.value
      }, !keyWord.value ? {
        d: common_vendor.f(list.value, (item, index, i0) => {
          return {
            a: common_vendor.t(item.title),
            b: common_vendor.f(item.children, (ele, k1, i1) => {
              return {
                a: common_vendor.t(ele.title),
                b: ele.id,
                c: common_vendor.o(($event) => goPage("/pages/grade/grade"), ele.id)
              };
            }),
            c: "edee3cf2-2-" + i0 + "," + ("edee3cf2-1-" + i0),
            d: common_vendor.sr(setItemRef, "edee3cf2-1-" + i0, {
              "f": 1
            }),
            e: "edee3cf2-1-" + i0,
            f: item.id,
            g: common_vendor.o(($event) => handleClick(index), item.id)
          };
        }),
        e: common_vendor.p({
          titleBorder: "show"
        }),
        f: setItemRef
      } : {}, {
        g: keyWord.value
      }, keyWord.value ? {
        h: common_vendor.p({
          list: searchList.value
        })
      } : {});
    };
  }
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-edee3cf2"], ["__file", "E:/workSpace/WanZai_School_app/pages/addressBook/addressBook.vue"]]);
wx.createPage(MiniProgramPage);
