import ActionButton, { useActionButtonContext } from "../ActionButton.js";
import RecordingIcon_default from "./RecordingIcon.js";
import { computed, createVNode, defineComponent, mergeProps } from "vue";
import { AudioMutedOutlined, AudioOutlined } from "@antdv-next/icons";
//#region components/sender/components/SpeechButton/index.tsx
var SpeechButton_default = /* @__PURE__ */ defineComponent({
	name: "SpeechButton",
	inheritAttrs: false,
	setup(_, { attrs }) {
		const context = useActionButtonContext();
		const mergedDisabled = computed(() => {
			return attrs.disabled ?? context.value.disabled ?? context.value.onSpeechDisabled;
		});
		const icon = computed(() => {
			const { speechRecording, prefixCls } = context.value;
			if (speechRecording) return createVNode(RecordingIcon_default, { "class": `${prefixCls}-recording-icon` }, null);
			if (mergedDisabled.value) return createVNode(AudioMutedOutlined, null, null);
			return createVNode(AudioOutlined, null, null);
		});
		return () => createVNode(ActionButton, mergeProps({
			"icon": icon.value,
			"variant": "text",
			"color": "primary"
		}, attrs, { "action": "onSpeech" }), null);
	}
});
//#endregion
export { SpeechButton_default as default };
