import { getCurrentInstance, ref, computed, resolveComponent, createElementBlock, openBlock, Fragment, createVNode, createBlock, createCommentVNode, unref, isRef, normalizeProps, mergeProps } from "vue";
/* empty css                */
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
const _sfc_main = {
  __name: "AppDetail",
  props: {
    params: {
      type: Object,
      default: {}
    },
    baseInfoPageSource: {
      type: String,
      default: "dynamic"
    },
    baseInfoPageId: {
      type: String,
      default: ""
    },
    options: {
      type: Array,
      default: []
    },
    document: {
      type: Boolean,
      default: false
    },
    approvalHistory: {
      type: Boolean,
      default: false
    },
    actionBar: {
      type: Object
    },
    taskId: {
      type: String,
      default: ""
    },
    taskType: {
      type: String,
      default: ""
    }
  },
  setup(__props) {
    const props = __props;
    const currentInstance = getCurrentInstance();
    const ctx = currentInstance.proxy;
    ctx.route;
    const activeName = ref("tab_base_info");
    const baseInfoPageId = ref("");
    if (props.baseInfoPageSource == "dynamic") ;
    else {
      baseInfoPageId.value = props.baseInfoPageId;
    }
    const tabsOptions = computed(() => {
      const tabs = [
        {
          id: "tab_base_info",
          title: "基本信息",
          pageId: baseInfoPageId.value
        },
        ...props.options || []
      ];
      if (props.document) {
        tabs.push({ id: "tab_doc_info", title: "要件信息" });
      }
      if (props.approvalHistory) {
        tabs.push({ id: "tab_timeline_info", title: "审批历史" });
      }
      return tabs;
    });
    computed(() => {
      return tabsOptions.value.find((item) => item.id == activeName.value);
    });
    return (_ctx, _cache) => {
      const _component_FecMobileTabs = resolveComponent("FecMobileTabs");
      const _component_FecMobileApprovalBar = resolveComponent("FecMobileApprovalBar");
      return openBlock(), createElementBlock(Fragment, null, [
        createVNode(_component_FecMobileTabs, {
          modelValue: unref(activeName),
          "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(activeName) ? activeName.value = $event : null),
          options: unref(tabsOptions),
          params: __props.params
        }, null, 8, ["modelValue", "options", "params"]),
        __props.actionBar ? (openBlock(), createBlock(_component_FecMobileApprovalBar, normalizeProps(mergeProps({ key: 0 }, __props.actionBar)), null, 16)) : createCommentVNode("", true)
      ], 64);
    };
  }
};
const _AppDetail = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ab2095bf"]]);
export {
  _AppDetail as default
};
