import useCreation from "./hooks/useCreation.js";
import { computed, createVNode, defineComponent } from "vue";
//#region components/conversations/Creation.tsx
var Creation = /* @__PURE__ */ defineComponent({
	name: "AxConversationsCreation",
	props: {
		label: {
			type: [
				String,
				Number,
				Object,
				Function
			],
			default: void 0
		},
		align: {
			type: String,
			default: void 0
		},
		prefixCls: {
			type: String,
			default: "antd-conversations-creation"
		},
		classes: {
			type: [
				String,
				Array,
				Object
			],
			default: void 0
		},
		style: {
			type: Object,
			default: void 0
		},
		shortcutKeyInfo: {
			type: Object,
			default: void 0
		},
		disabled: {
			type: Boolean,
			default: false
		},
		icon: {
			type: [
				String,
				Number,
				Object,
				Function
			],
			default: void 0
		},
		onClick: {
			type: Function,
			default: void 0
		}
	},
	setup(props) {
		const mergedConfig = computed(() => {
			return useCreation({
				icon: props.icon,
				label: props.label,
				align: props.align,
				shortcutKeyInfo: props.shortcutKeyInfo,
				prefixCls: props.prefixCls
			});
		});
		return () => {
			const [iconNode, labelNode, mergeAlign] = mergedConfig.value;
			return createVNode("button", {
				"type": "button",
				"onClick": (event) => {
					if (props.disabled) return;
					props.onClick?.(event);
				},
				"style": props.style,
				"class": [
					props.prefixCls,
					props.classes,
					`${props.prefixCls}-${mergeAlign}`,
					{ [`${props.prefixCls}-disabled`]: props.disabled }
				]
			}, [iconNode, labelNode]);
		};
	}
});
//#endregion
export { Creation as default };
