import { cs } from "../utils/styles.js";
import { useStyleConfig } from "../core/theme.js";
import vui from "../core/vui.js";
import Icon from "../icon/icon.js";
import { dialogStatusMapping } from "./consts.js";
import { useDialogContext } from "./context.js";
import { jsx } from "react/jsx-runtime";

//#region src/dialog/dialogIcon.tsx
/** Shows an icon based on a given status. Optionally, can be a custom icon. */
const DialogIcon = vui((props, ref) => {
	const { className, ...rest } = props;
	const { status = "" } = useDialogContext() ?? {};
	const styles = useStyleConfig("Dialog", useDialogContext());
	const { iconProps } = dialogStatusMapping[status] ?? {};
	return /* @__PURE__ */ jsx(Icon, {
		className: cs("vui-dialogIcon", className),
		mr: 2,
		ref,
		...styles.icon,
		...iconProps,
		...rest
	});
});
DialogIcon.displayName = "DialogIcon";

//#endregion
export { DialogIcon as default };
globalThis.__vuiVersion__ = "4.0.1"
//# sourceMappingURL=dialogIcon.js.map