UNPKG

ant-design-x-vue

Version:

Craft AI-driven interfaces effortlessly

66 lines (65 loc) 1.92 kB
import { defineComponent as r, mergeDefaults as s, computed as i, createVNode as l, mergeProps as m } from "vue"; import { a as f } from "../../../attachments/Attachments2.mjs"; import { theme as p } from "ant-design-vue"; import I from "../ActionButton/index.mjs"; import { useActionButtonContextInject as g } from "../ActionButton/context.mjs"; import y from "./RecordingIcon.mjs"; import { j as b, k as h } from "../../../attachments/FileList/FileList2.mjs"; const A = /* @__PURE__ */ r({ name: "AXSenderSpeechButton", __name: "index", props: s({ prefixCls: null, type: null, htmlType: null, shape: null, size: null, loading: null, disabled: null, ghost: null, block: null, danger: null, icon: null, href: null, target: null, title: null, onClick: null, onMousedown: null, audioIcon: null, audioDisabledIcon: null, audioRecordingIcon: null }, { type: "text", disabled: void 0, audioIcon: () => l(h, null, null), audioDisabledIcon: () => l(b, null, null), audioRecordingIcon: void 0 }), setup(e) { const t = f(e, ["type", "disabled", "audioIcon", "audioDisabledIcon", "audioRecordingIcon"]), o = g(), { token: u } = p.useToken(), d = i(() => o.value.speechRecording), a = i(() => o.value.prefixCls), c = i(() => { let n; return d.value ? n = e.audioRecordingIcon ? e.audioRecordingIcon : l(y, { className: `${a.value}-recording-icon` }, null) : o.value.onSpeechDisabled ? n = e.audioDisabledIcon : n = e.audioIcon, n; }); return () => l(I, m({ type: e.type, disabled: e.disabled }, t, { style: { display: "flex", justifyContent: "center", alignItems: "center", color: u.value.colorPrimary }, action: "onSpeech" }), { default: () => [c.value] }); } }); export { A as default };