import { XProviderContextKey } from "./context.js";
import useXProviderContext, { defaultPrefixCls } from "./hooks/use-x-provider-context.js";
import { computed, createVNode, defineComponent, mergeProps, provide, useAttrs } from "vue";
import { ConfigProvider } from "antdv-next";
//#region components/x-provider/index.tsx
var XProvider = /* @__PURE__ */ defineComponent({
	name: "AxProvider",
	inheritAttrs: false,
	props: {
		attachments: {
			type: Object,
			default: void 0
		},
		actions: {
			type: Object,
			default: void 0
		},
		bubble: {
			type: Object,
			default: void 0
		},
		conversations: {
			type: Object,
			default: void 0
		},
		fileCard: {
			type: Object,
			default: void 0
		},
		sources: {
			type: Object,
			default: void 0
		},
		codeHighlighter: {
			type: Object,
			default: void 0
		},
		mermaid: {
			type: Object,
			default: void 0
		},
		prompts: {
			type: Object,
			default: void 0
		},
		suggestion: {
			type: Object,
			default: void 0
		},
		sender: {
			type: Object,
			default: void 0
		},
		think: {
			type: Object,
			default: void 0
		},
		thoughtChain: {
			type: Object,
			default: void 0
		},
		welcome: {
			type: Object,
			default: void 0
		},
		theme: {
			type: Object,
			default: void 0
		},
		locale: {
			type: Object,
			default: void 0
		},
		iconPrefixCls: {
			type: String,
			default: void 0
		}
	},
	setup(props, { slots }) {
		const attrs = useAttrs();
		provide(XProviderContextKey, computed(() => {
			return {
				attachments: props.attachments,
				actions: props.actions,
				bubble: props.bubble,
				conversations: props.conversations,
				fileCard: props.fileCard,
				sources: props.sources,
				codeHighlighter: props.codeHighlighter,
				mermaid: props.mermaid,
				prompts: props.prompts,
				suggestion: props.suggestion,
				sender: props.sender,
				think: props.think,
				thoughtChain: props.thoughtChain,
				welcome: props.welcome
			};
		}));
		return () => createVNode(ConfigProvider, mergeProps(attrs, {
			"theme": props.theme,
			"locale": props.locale,
			"iconPrefixCls": props.iconPrefixCls
		}), { default: () => [slots.default?.()] });
	}
});
//#endregion
export { XProvider as default, defaultPrefixCls, useXProviderContext };
