import { defineComponent, markRaw, defineAsyncComponent, computed, openBlock, createElementBlock, renderSlot, createElementVNode, Fragment, renderList, unref, normalizeStyle, toDisplayString, normalizeClass, createBlock, resolveDynamicComponent, mergeProps, toHandlers } from "vue";
var employeeSelector = {
  employeeData: null,
  topFiveEmployeeData: null,
  organization: null,
  organization_count: null,
  count: 0,
  dept_list: [],
  company_list: [],
  company_list_count: 0,
  companyEmployeeList: [],
  totalCompanyEmployeeList: [],
  totalCompanyEmployeeObjList: []
};
let Store = {
  sid: "",
  app_id: "",
  user_id: "",
  user_name: "",
  corp_id: "",
  node_env: "",
  domain: "",
  token: "",
  card_resource: "",
  employeeSelector
};
var Store$1 = new Proxy(Store, {
  get(target, name, property) {
    return Reflect.get(target, name, property);
  },
  set(target, name, value, property) {
    return Reflect.set(target, name, value, property);
  }
});
var index_vue_vue_type_style_index_0_scoped_true_lang = "";
var _export_sfc = (sfc, props) => {
  const target = sfc.__vccOpts || sfc;
  for (const [key, val] of props) {
    target[key] = val;
  }
  return target;
};
const _hoisted_1 = { class: "render-card" };
const _hoisted_2 = { class: "card-field" };
const _hoisted_3 = {
  key: 2,
  class: "row-right"
};
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "index",
  props: {
    data: { default: () => {
      return {};
    } },
    list: { default: () => {
      return [];
    } },
    fieldConfig: { default: () => {
      return {};
    } },
    tenantConfig: { default: () => {
      return {};
    } },
    is_trial: { type: Boolean, default: false },
    env_data: { default: () => {
      return {};
    } }
  },
  setup(__props) {
    const props = __props;
    const componentDict = {
      USER_GROUPS: markRaw(
        defineAsyncComponent(() => import("./index3.js"))
      ),
      USERS: markRaw(
        defineAsyncComponent(() => import("./index6.js"))
      ),
      HANDLE_TEXT: markRaw(
        defineAsyncComponent(() => import("./index7.js"))
      ),
      BUSINESS_STAGE: markRaw(
        defineAsyncComponent(() => import("./index8.js"))
      ),
      IMAGE: markRaw(
        defineAsyncComponent(() => import("./index10.js"))
      ),
      TAGS: markRaw(
        defineAsyncComponent(() => import("./index11.js"))
      ),
      CONTACT_WAYS: markRaw(
        defineAsyncComponent(() => import("./index12.js"))
      )
    };
    Store$1.corp_id = props.env_data.corp_id;
    Store$1.node_env = props.env_data.node_env;
    Store$1.sid = props.env_data.sid;
    Store$1.token = props.env_data.token;
    const filterList = computed(() => {
      return props.list.filter((item) => item.hidden !== true);
    });
    const isEmpty = (val) => {
      return val === null || val === void 0 || val === "" || JSON.stringify(val) === "{}" || JSON.stringify(val) === "[]";
    };
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock("div", _hoisted_1, [
        renderSlot(_ctx.$slots, "card-title", {}, void 0, true),
        createElementVNode("div", _hoisted_2, [
          (openBlock(true), createElementBlock(Fragment, null, renderList(unref(filterList), (item, index) => {
            return openBlock(), createElementBlock("div", {
              class: "card-row",
              key: item.key || index
            }, [
              createElementVNode("span", {
                class: "row-left",
                style: normalizeStyle({ width: item.labelWidth })
              }, toDisplayString(item.label), 5),
              item.slot ? renderSlot(_ctx.$slots, item.slot, {
                key: 0,
                allData: __props.data,
                data: __props.data[item.key]
              }, void 0, true) : !isEmpty(__props.data[item.key]) && !item.slot ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
                item.vType == "TEXT" || !item.vType ? (openBlock(), createElementBlock("span", {
                  key: 0,
                  class: normalizeClass(["row-right", { "a-row": item.aRow }])
                }, toDisplayString(__props.data[item.key]), 3)) : (openBlock(), createBlock(resolveDynamicComponent(componentDict[item.vType]), mergeProps({
                  key: 1,
                  data: __props.data[item.key],
                  listItem: item,
                  allData: __props.data,
                  fieldConfig: __props.fieldConfig,
                  tenantConfig: __props.tenantConfig,
                  is_trial: __props.is_trial
                }, { ..._ctx.$attrs, ...item }, toHandlers(item["event"] || {})), null, 16, ["data", "listItem", "allData", "fieldConfig", "tenantConfig", "is_trial"]))
              ], 64)) : (openBlock(), createElementBlock("span", _hoisted_3, " -- "))
            ]);
          }), 128))
        ]),
        renderSlot(_ctx.$slots, "card-bottom", {}, void 0, true)
      ]);
    };
  }
});
var Comp = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f4951f1c"]]);
var __uno = "";
Comp.install = (app) => {
  app.component(Comp.name, Comp);
};
export { Comp as C, Store$1 as S, _export_sfc as _ };
