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 { useButtonContext } from "./context.js";
import { jsx } from "react/jsx-runtime";

//#region src/button/buttonIcon.tsx
const isConceptualIcon = (name) => name?.startsWith("con");
/** Displays an icon within the Button. */
const ButtonIcon = vui((props, ref) => {
	const { className, name, ...rest } = props;
	const styles = useStyleConfig("Button", useButtonContext());
	const verifiedName = isConceptualIcon(name) ? void 0 : name;
	return /* @__PURE__ */ jsx(Icon, {
		className: cs("vui-buttonIcon", className),
		name: verifiedName,
		ref,
		...styles.icon,
		...rest
	});
});
ButtonIcon.displayName = "ButtonIcon";

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