import { defineComponent, ref, openBlock, createElementBlock, normalizeClass, unref, toDisplayString, createCommentVNode, createTextVNode } from "vue";
import "../../../adapter-vue.mjs";
import { TUITranslateService } from "@tencentcloud/chat-uikit-engine";
import { TUIConstants } from "@tencentcloud/tui-core";
import { isPC } from "../../../utils/env.mjs";
import ChatConfig from "../config.mjs";
const _hoisted_1 = {
  key: 0,
  class: "message-input-button-hover"
};
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "message-input-button",
  props: {
    enableSend: {
      type: Boolean,
      default: true
    }
  },
  emits: ["sendMessage"],
  setup(__props, { emit: __emit }) {
    const props = __props;
    const displayHover = ref(ChatConfig.getChatType() !== TUIConstants.TUIChat.TYPE.ROOM);
    const emits = __emit;
    const sendMessage = () => {
      emits("sendMessage");
    };
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock("div", {
        class: normalizeClass(["message-input-button", !unref(isPC) && "message-input-button-h5"])
      }, [
        props.enableSend ? (openBlock(), createElementBlock("button", {
          key: 0,
          class: "message-input-button-cont",
          "data-type": "text",
          disabled: false,
          onClick: sendMessage
        }, [
          unref(displayHover) ? (openBlock(), createElementBlock("p", _hoisted_1, toDisplayString(unref(TUITranslateService).t("TUIChat.按Enter发送，Ctrl+Enter换行")), 1)) : createCommentVNode("", true),
          createTextVNode(" " + toDisplayString(unref(TUITranslateService).t("发送")), 1)
        ])) : createCommentVNode("", true)
      ], 2);
    };
  }
});
export {
  _sfc_main as default
};
