ant-design-x-vue
Version:
Craft AI-driven interfaces effortlessly
60 lines (59 loc) • 1.62 kB
JavaScript
import { defineComponent as c, mergeDefaults as d, computed as o, createVNode as l, mergeProps as m } from "vue";
import { a as p } from "../../../attachments/Attachments2.mjs";
import { theme as f } from "ant-design-vue";
import y from "../ActionButton/index.mjs";
import { useActionButtonContextInject as g } from "../ActionButton/context.mjs";
import h from "./RecordingIcon.mjs";
import { j as x, k as b } from "../../../attachments/FileList/FileList2.mjs";
const j = /* @__PURE__ */ c({
name: "AXSenderSpeechButton",
__name: "index",
props: d({
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
}, {
type: "text",
disabled: void 0
}),
setup(n) {
const u = p(n, ["type", "disabled"]), t = g(), {
token: r
} = f.useToken(), s = o(() => t.value.speechRecording), i = o(() => t.value.prefixCls), a = o(() => {
let e;
return s.value ? e = l(h, {
className: `${i.value}-recording-icon`
}, null) : t.value.onSpeechDisabled ? e = l(x, null, null) : e = l(b, null, null), e;
});
return () => l(y, m({
type: n.type,
disabled: n.disabled
}, u, {
style: {
display: "flex",
justifyContent: "center",
alignItems: "center",
color: r.value.colorPrimary
},
action: "onSpeech"
}), {
default: () => [a.value]
});
}
});
export {
j as default
};