import { ACTIONS_ITEM_STATUS, XActionsItem } from "./ActionsItem.js";
import { createVNode, defineComponent, mergeProps } from "vue";
import { MutedOutlined, SoundOutlined } from "@antdv-next/icons";
//#region components/actions/ActionsAudio.tsx
var XActionsAudio = /* @__PURE__ */ defineComponent({
	name: "AxActionsAudio",
	props: {
		status: {
			type: String,
			default: ACTIONS_ITEM_STATUS.DEFAULT
		},
		prefixCls: {
			type: String,
			default: "antd-actions"
		},
		rootClass: {
			type: String,
			default: ""
		},
		class: {
			type: [
				String,
				Array,
				Object
			],
			default: void 0
		},
		style: {
			type: [
				String,
				Object,
				Array
			],
			default: void 0
		},
		classes: {
			type: Object,
			default: () => ({})
		},
		styles: {
			type: Object,
			default: () => ({})
		}
	},
	setup(props, { attrs }) {
		const audioCls = `${props.prefixCls}-audio`;
		const statusLabelMap = {
			[ACTIONS_ITEM_STATUS.LOADING]: "Loading audio",
			[ACTIONS_ITEM_STATUS.ERROR]: "Audio error",
			[ACTIONS_ITEM_STATUS.RUNNING]: "Playing audio",
			[ACTIONS_ITEM_STATUS.DEFAULT]: "Audio"
		};
		return () => createVNode(XActionsItem, mergeProps(attrs, {
			"label": statusLabelMap[props.status || ACTIONS_ITEM_STATUS.DEFAULT],
			"style": props.style,
			"styles": props.styles,
			"class": props.class,
			"rootClass": [
				props.rootClass,
				props.classes?.root,
				props.prefixCls,
				audioCls,
				props.status ? `${audioCls}-${props.status}` : void 0
			].filter(Boolean).join(" "),
			"classes": props.classes,
			"status": props.status,
			"defaultIcon": createVNode(MutedOutlined, null, null),
			"runningIcon": createVNode(SoundOutlined, { "class": `${audioCls}-recording-icon` }, null),
			"prefixCls": props.prefixCls
		}), null);
	}
});
//#endregion
export { XActionsAudio, XActionsAudio as default };
