import { defineComponent, ref, openBlock, createElementBlock, createBlock, unref, createCommentVNode, withModifiers, createVNode, pushScopeId, popScopeId, createElementVNode } from "vue";
import { n as _export_sfc, s as _sfc_main$1, r as _sfc_main$2, t as _sfc_main$3 } from "./index2.js";
import "vant";
import "@wltech/svg";
import "dayjs";
import "qs";
import "vuedraggable";
import "vue-router";
var index_vue_vue_type_style_index_0_scoped_true_lang = "";
const _withScopeId = (n) => (pushScopeId("data-v-01b1ba05"), n = n(), popScopeId(), n);
const _hoisted_1 = { class: "render-card-company" };
const _hoisted_2 = ["onClick"];
const _hoisted_3 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", null, "\u6DFB\u52A0", -1));
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "index",
  props: {
    data: { default: () => {
    } },
    listItem: { default: () => {
      return {};
    } },
    env_data: { default: () => {
      return {};
    } }
  },
  emits: ["onClickEnterprise", "onClickRetract", "onChoose", "sendSearchValue"],
  setup(__props, { emit }) {
    const props = __props;
    const onClickEnterprise = (item) => {
      var _a;
      if (!((_a = props.listItem) == null ? void 0 : _a.allowClick))
        return;
      emit("onClickEnterprise", item);
    };
    const onClickRetract = (bol) => {
      var _a;
      if (!((_a = props.listItem) == null ? void 0 : _a.allowClick))
        return;
      emit("onClickRetract", bol);
    };
    const enterpriseVisible = ref(false);
    const onAdd = () => {
      enterpriseVisible.value = true;
    };
    const onChoose = (item) => {
      emit("onChoose", item);
    };
    const sendSearchValue = (name) => {
      emit("sendSearchValue", name);
    };
    return (_ctx, _cache) => {
      var _a;
      return openBlock(), createElementBlock("div", _hoisted_1, [
        ((_a = __props.data) == null ? void 0 : _a.length) ? (openBlock(), createBlock(unref(_sfc_main$1), {
          key: 0,
          class: "company-list",
          data: __props.data,
          canViewMore: !!__props.listItem.allowClick,
          retract: __props.listItem.retract || 0,
          onOnClickEnterprise: onClickEnterprise,
          onOnClickRetract: onClickRetract
        }, null, 8, ["data", "canViewMore", "retract"])) : createCommentVNode("", true),
        __props.listItem.isAdd ? (openBlock(), createElementBlock("div", {
          key: 1,
          class: "company-add",
          onClick: withModifiers(onAdd, ["stop"])
        }, [
          createVNode(_sfc_main$2, {
            type: "add",
            width: "12",
            height: "12",
            color: "var(--wl-primary-color)"
          }),
          _hoisted_3
        ], 8, _hoisted_2)) : createCommentVNode("", true),
        createVNode(unref(_sfc_main$3), {
          modelValue: enterpriseVisible.value,
          "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => enterpriseVisible.value = $event),
          env_data: __props.env_data,
          onOnChoose: onChoose,
          onSendSearchValue: sendSearchValue
        }, null, 8, ["modelValue", "env_data"])
      ]);
    };
  }
});
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-01b1ba05"]]);
export { index as default };
