"use strict";
const common_vendor = require("../../../common/vendor.js");
const hook_useOnLoad_index = require("../../../hook/use-on-load/index.js");
const pagesCrm_static_schemeDetail = require("../../static/schemeDetail.js");
require("../../../config/globalData.js");
const pagesCrm_service_schemeDetail_index = require("../../service/schemeDetail/index.js");
if (!Math) {
  (AnnouncementsVue + AnnouncementsVue + ReturnVisitVue + HealthEducationVue + QuestionnaireVue)();
}
const AnnouncementsVue = () => "./template/announcements.js";
const HealthEducationVue = () => "./template/health-education.js";
const QuestionnaireVue = () => "./template/questionnaire.js";
const ReturnVisitVue = () => "./template/return-visit.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  ...{
    components: {
      AnnouncementsVue,
      HealthEducationVue,
      QuestionnaireVue,
      ReturnVisitVue
    }
  },
  __name: "schemeDetail",
  setup(__props) {
    const option = common_vendor.reactive({
      type: "",
      planuuid: "",
      id: "",
      memberName: "",
      date: "",
      index: ""
    });
    const content = common_vendor.ref([]);
    const getPatientGroupPlanDetailList = async () => {
      const params = {
        PlanUuid: option.planuuid,
        TempType: option.type
      };
      const resp = await pagesCrm_service_schemeDetail_index.GetPatientGroupPlanDetailList(params);
      content.value = resp;
    };
    const getPatientGroupPlanDetail = async () => {
      const params = {
        Id: option.id
      };
      const resp = await pagesCrm_service_schemeDetail_index.GetPatientGroupPlanDetail(params);
      content.value = resp;
    };
    hook_useOnLoad_index.useOnLoad((options) => {
      common_vendor.index.setNavigationBarTitle({
        title: pagesCrm_static_schemeDetail.schemeTypeEnum[options.type]
      });
      Object.keys(options).map((key) => {
        option[key] = options[key];
      });
      if ([pagesCrm_static_schemeDetail.schemeTypeEnum["宣教"], pagesCrm_static_schemeDetail.schemeTypeEnum["问卷"]].includes(option.type)) {
        getPatientGroupPlanDetail();
      } else {
        getPatientGroupPlanDetailList();
      }
    });
    return (_ctx, _cache) => {
      return common_vendor.e({
        a: option.type == common_vendor.unref(pagesCrm_static_schemeDetail.schemeTypeEnum)["服务告知"]
      }, option.type == common_vendor.unref(pagesCrm_static_schemeDetail.schemeTypeEnum)["服务告知"] ? {
        b: common_vendor.p({
          content: content.value,
          date: option.date,
          index: option.index
        })
      } : {}, {
        c: option.type == common_vendor.unref(pagesCrm_static_schemeDetail.schemeTypeEnum)["注意事项"]
      }, option.type == common_vendor.unref(pagesCrm_static_schemeDetail.schemeTypeEnum)["注意事项"] ? {
        d: common_vendor.p({
          content: content.value,
          date: option.date,
          index: option.index
        })
      } : {}, {
        e: option.type == common_vendor.unref(pagesCrm_static_schemeDetail.schemeTypeEnum)["复诊提醒"]
      }, option.type == common_vendor.unref(pagesCrm_static_schemeDetail.schemeTypeEnum)["复诊提醒"] ? {
        f: common_vendor.p({
          content: content.value,
          date: option.date,
          index: option.index
        })
      } : {}, {
        g: option.type == common_vendor.unref(pagesCrm_static_schemeDetail.schemeTypeEnum)["宣教"]
      }, option.type == common_vendor.unref(pagesCrm_static_schemeDetail.schemeTypeEnum)["宣教"] ? {
        h: common_vendor.p({
          content: content.value,
          date: option.date,
          index: option.index
        })
      } : {}, {
        i: option.type == common_vendor.unref(pagesCrm_static_schemeDetail.schemeTypeEnum)["问卷"]
      }, option.type == common_vendor.unref(pagesCrm_static_schemeDetail.schemeTypeEnum)["问卷"] ? {
        j: common_vendor.p({
          content: content.value,
          date: option.date,
          index: option.index
        })
      } : {});
    };
  }
});
wx.createPage(_sfc_main);
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pagesCrm/business/schemeDetail/schemeDetail.js.map
