/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
"use client";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
require("../../_virtual/_rolldown/runtime.cjs");
const require_components_Icon = require("../../components/Icon.cjs");
require("../../components/client/Button/buttonConstants.cjs");
const require_components_client_IconButton_IconButtonBase = require("../../components/client/IconButton/IconButtonBase.cjs");
let _yahoo_uds_icons = require("@yahoo/uds-icons");
let react = require("react");
let react_jsx_runtime = require("react/jsx-runtime");
//#region src/css-animation/IconButton/IconButton.tsx
/**
* CSS-animation IconButton variant. This component intentionally never imports motion.
*
* @componentType Client component
*/
const IconButton = (0, react.forwardRef)(function IconButton(props, forwardedRef) {
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_client_IconButton_IconButtonBase.IconButtonBase, {
		...props,
		ref: forwardedRef,
		renderIconContent: ({ asChild, loading, name, iconVariant, children, iconClassName, loadingIconClassName, iconSlotClassName, iconSlotProps }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [loading && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Icon.Icon, {
			size: "sm",
			name: _yahoo_uds_icons.Progress,
			variant: iconVariant,
			color: "current",
			className: loadingIconClassName
		}) }), name && !loading && (!asChild && children || /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Icon.Icon, {
			size: "sm",
			name,
			variant: iconVariant,
			color: "current",
			className: [iconClassName, iconSlotClassName].filter(Boolean).join(" "),
			...iconSlotProps
		}))] }),
		renderRoot: ({ asChild, Slot, children, buttonRef, type, htmlName, rootClassName, rest, iconContent }) => {
			if (asChild && (0, react.isValidElement)(children)) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Slot, {
				type,
				className: rootClassName,
				...rest,
				children: require_components_client_IconButton_IconButtonBase.renderIconButtonAsChild(children, iconContent)
			});
			return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
				ref: buttonRef,
				type,
				className: rootClassName,
				name: htmlName,
				...rest,
				children: iconContent
			});
		}
	});
});
IconButton.displayName = "IconButton";
//#endregion
exports.IconButton = IconButton;
