import { defineComponent, ref, resolveComponent, openBlock, createElementBlock, Fragment, withDirectives, createElementVNode, toDisplayString, withModifiers, createVNode, unref, vShow, createBlock } from "vue";
import _sfc_main$2 from "./index3.js";
import { a as _sfc_main$1, b as bo_input_close } 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_lang = "";
const _hoisted_1 = { class: "business-opportunity-card-input" };
const _hoisted_2 = { class: "msg-alert" };
const _hoisted_3 = ["onClick"];
const __default__ = {
  name: "DefaultInput"
};
const _sfc_main = /* @__PURE__ */ defineComponent({
  ...__default__,
  props: {
    modelValue: { default: "" },
    data: { default: null },
    msg: { default: "\u586B\u5199\u5546\u673A\u540D\u79F0\uFF0C\u4FBF\u4E8E\u533A\u5206\u4E0D\u540C\u5546\u673A\u54E6\uFF5E" },
    placeholder: { default: "\u8BF7\u8F93\u5165\u5546\u673A\u540D\u79F0" },
    msg_visible: { type: Boolean, default: true }
  },
  emits: ["onEdit"],
  setup(__props, { emit }) {
    const props = __props;
    const title = ref("");
    const msgVisible = ref(true);
    const onCloseMsg = () => msgVisible.value = false;
    const onBlur = () => {
      emit("onEdit", {
        input_value: title.value,
        business_data: props.data
      });
    };
    return (_ctx, _cache) => {
      const _component_van_field = resolveComponent("van-field");
      return openBlock(), createElementBlock("div", _hoisted_1, [
        __props.data.input_edit ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
          withDirectives(createElementVNode("div", _hoisted_2, [
            createElementVNode("p", null, toDisplayString(__props.msg), 1),
            createElementVNode("div", {
              class: "icon",
              onClick: withModifiers(onCloseMsg, ["stop"])
            }, [
              createVNode(_sfc_main$1, { src: unref(bo_input_close) }, null, 8, ["src"])
            ], 8, _hoisted_3)
          ], 512), [
            [vShow, msgVisible.value && __props.msg_visible]
          ]),
          createElementVNode("div", {
            onClick: _cache[1] || (_cache[1] = withModifiers(() => {
            }, ["stop"]))
          }, [
            createVNode(_component_van_field, {
              modelValue: title.value,
              "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => title.value = $event),
              placeholder: __props.placeholder,
              onBlur,
              class: "input"
            }, null, 8, ["modelValue", "placeholder"])
          ])
        ], 64)) : (openBlock(), createBlock(_sfc_main$2, {
          key: 1,
          text: __props.modelValue
        }, null, 8, ["text"]))
      ]);
    };
  }
});
export { _sfc_main as default };
