/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
"use client";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
const require_components_Icon = require("../../components/Icon.cjs");
const require_components_IconSlot = require("../../components/IconSlot.cjs");
const require_components_client_Button_ButtonBase = require("../../components/client/Button/ButtonBase.cjs");
require("../../components/client/Button/buttonConstants.cjs");
let _yahoo_uds_icons = require("@yahoo/uds-icons");
let react = require("react");
react = require_runtime.__toESM(react);
let react_jsx_runtime = require("react/jsx-runtime");
//#region src/css-animation/Button/Button.tsx
/**
* CSS-animation Button variant. This component intentionally never imports motion.
*
* @componentType Client component
*/
const Button = (0, react.forwardRef)(function Button(props, forwardedRef) {
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_client_Button_ButtonBase.ButtonBase, {
		...props,
		ref: forwardedRef,
		renderStartContent: ({ iconVariant, loading, startIcon, iconContainerClassName, loadingIconClassName, iconClassName, startIconClassName, startIconSlotProps }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
			className: iconContainerClassName,
			children: [loading && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Icon.Icon, {
				className: loadingIconClassName,
				size: "sm",
				name: _yahoo_uds_icons.Progress,
				variant: iconVariant,
				color: "current"
			}) }), startIcon && !loading && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_IconSlot.IconSlot, {
				className: [iconClassName, startIconClassName].filter(Boolean).join(" "),
				icon: startIcon,
				iconProps: {
					size: "sm",
					variant: iconVariant,
					color: "current"
				},
				...startIconSlotProps
			}) })]
		}),
		renderEndContent: ({ endIcon, iconVariant, iconContainerClassName, iconClassName, endIconClassName, endIconSlotProps }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
			className: iconContainerClassName,
			children: endIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_IconSlot.IconSlot, {
				className: [iconClassName, endIconClassName].filter(Boolean).join(" "),
				icon: endIcon,
				iconProps: {
					size: "sm",
					variant: iconVariant,
					color: "current"
				},
				...endIconSlotProps
			}) })
		}),
		renderRoot: ({ asChild, Slot, children, buttonRef, type, rootClassName, rest, contentClassName, contentSlotProps, startContent, endContent }) => {
			if (asChild && (0, react.isValidElement)(children)) {
				const childProps = children.props;
				return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Slot, {
					type,
					className: rootClassName,
					...rest,
					children: require_components_client_Button_ButtonBase.renderButtonChildren(children, childProps, startContent, contentClassName, contentSlotProps, endContent)
				});
			}
			return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
				ref: buttonRef,
				type,
				className: rootClassName,
				...rest,
				children: [
					startContent,
					/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
						className: contentClassName,
						...contentSlotProps,
						children
					}),
					endContent
				]
			});
		}
	});
});
Button.displayName = "Button";
//#endregion
exports.Button = Button;
