import { defineComponent, ref, reactive, resolveComponent, resolveDirective, mergeProps, useSSRContext } from "vue";
import { useStore } from "vuex";
import { _ as _sfc_main$1 } from "./banner-Bjm1R_JU.js";
import { ssrRenderAttrs, ssrRenderComponent, ssrRenderList, ssrRenderStyle, ssrRenderAttr, ssrInterpolate, ssrGetDirectiveProps } from "vue/server-renderer";
import { _ as _export_sfc } from "../entry-server.js";
import "vue-router";
import "element-plus";
import "axios";
import "vue3-lazy";
const _sfc_main = defineComponent({
  setup() {
    const store = useStore();
    const requestParams = ref({});
    let paramsData = reactive({});
    let oldCategoryId = ref();
    function facilityClick(item) {
      if (item.id != oldCategoryId.value) {
        requestParams.value = item;
        paramsData = {
          params: {
            categoryid: item.id,
            pageNum: 1,
            pageSize: 10,
            order: "sortindex"
          },
          index: store.state.currentPagePath,
          sub: store.state.sub
        };
        oldCategoryId.value = item.id;
        store.dispatch("getPageData", paramsData).then(() => {
          store.commit("setColumnTypes", store.state.pageContent);
        });
      }
    }
    return { store, facilityClick };
  },
  components: {
    banner: _sfc_main$1
  },
  asyncData({ store, route }) {
    let params = reactive(route.value);
    return store.dispatch("getMenuList").then(() => {
      const data = store.state.menuList;
      let paramsData = reactive({});
      for (let i = 0; i < data.length; i++) {
        if (!data[i].sname && params.path == data[i].path) {
          paramsData = {
            params: {
              categoryid: data[i].id,
              pageNum: 1,
              pageSize: 100,
              order: "sortindex"
            },
            index: params.path,
            sub: i
          };
          return store.dispatch("getPageData", paramsData).then(() => {
            store.commit("setColumnTypes", store.state.pageContent);
          });
        }
      }
    });
  }
});
function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
  const _component_banner = resolveComponent("banner");
  const _directive_lazy = resolveDirective("lazy");
  _push(`<div${ssrRenderAttrs(mergeProps({ class: "pageContain" }, _attrs))}><div class="common-bradcrumb-section">`);
  _push(ssrRenderComponent(_component_banner, null, null, _parent));
  _push(`</div><!--[-->`);
  ssrRenderList(_ctx.store.state.columnTypes, (arr, index2) => {
    _push(`<section class="about-introduce-section course-section pt-40 pb-60 about-sec" style="${ssrRenderStyle({ background: index2 % 2 == 1 ? "#F4F8FD" : "#fff" })}"><div${ssrRenderAttr("id", arr.id)} class="pointOffset">0</div><div class="container"><div class="row"><div class="col-md-2 col-sm-12 text-center">`);
    if (index2 == 0) {
      _push(`<ul class="aboutTyes"><!--[-->`);
      ssrRenderList(_ctx.store.state.columnTypes, (item, i) => {
        _push(`<li><a${ssrRenderAttr("href", `#${item.id}`)}>${ssrInterpolate(item.title)}</a></li>`);
      });
      _push(`<!--]--></ul>`);
    } else {
      _push(`<!---->`);
    }
    _push(`</div><div class="col-md-10 col-sm-12"><div class="section-title text-center both-border pb-20"><span class="title-tag">${ssrInterpolate(arr.title)}</span></div>`);
    if (arr.image) {
      _push(`<div class="row aboutOnlyText text-left" style="${ssrRenderStyle([{ padding: index2 % 2 == 1 ? "40px 25px" : " 40px 25px" }, { "background-color": "#ffff", "box-shadow": "0px 10px 20px 10px rgb(179 202 216 / 20%)" }])}"><div class="col-md-7 pr-40 aboutImg"><img${ssrRenderAttrs(mergeProps({ alt: "" }, ssrGetDirectiveProps(_ctx, _directive_lazy, arr.image)))}></div><div class="col-md-5">${arr.content}</div></div>`);
    } else {
      _push(`<div class="aboutOnlyText row text-left" style="${ssrRenderStyle([{ padding: index2 % 2 == 1 ? "40px" : "0 " }, { "background-color": "#ffff" }])}"><div class="about-text-image">${arr.content}</div></div>`);
    }
    _push(`</div></div></div></section>`);
  });
  _push(`<!--]--></div>`);
}
const _sfc_setup = _sfc_main.setup;
_sfc_main.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/views/about/index.vue");
  return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["ssrRender", _sfc_ssrRender]]);
export {
  index as default
};
