/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
"use client";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
require("../../../_virtual/_rolldown/runtime.cjs");
const require_styles_styler = require("../../../styles/styler.cjs");
const require_components_Icon = require("../../Icon.cjs");
const require_components_client_PaddleNav_paddleButtonIcons = require("./paddleButtonIcons.cjs");
const require_components_client_PaddleNav_paddleNavContext = require("./paddleNavContext.cjs");
let react = require("react");
let react_jsx_runtime = require("react/jsx-runtime");
//#region src/components/client/PaddleNav/PaddleButton.tsx
const PaddleButton = (0, react.forwardRef)(function PaddleButton({ onClick, disabled = false, hidden = false, icon, paddleRole, className, ...rest }, ref) {
	const { variant, size, orientation, registerPaddleHidden } = require_components_client_PaddleNav_paddleNavContext.usePaddleNavContext();
	(0, react.useLayoutEffect)(() => {
		registerPaddleHidden(paddleRole, hidden);
		return () => registerPaddleHidden(paddleRole, false);
	}, [
		paddleRole,
		hidden,
		registerPaddleHidden
	]);
	const resolvedIcon = icon ?? require_components_client_PaddleNav_paddleButtonIcons.pickDefaultPaddleIcon(orientation, paddleRole);
	const rootClass = (0, react.useMemo)(() => require_styles_styler.cx(require_styles_styler.getStyles({ paddlenavSizeRoot: size }), require_styles_styler.getStyles({ paddlenavVariantRoot: variant })), [size, variant]);
	const backgroundClass = (0, react.useMemo)(() => require_styles_styler.getStyles({ paddlenavVariantBackground: variant }), [variant]);
	const iconSizeClass = (0, react.useMemo)(() => require_styles_styler.getStyles({ paddlenavSizeIcon: size }), [size]);
	const iconVariantClass = (0, react.useMemo)(() => require_styles_styler.getStyles({ paddlenavVariantIcon: variant }), [variant]);
	const styles = require_styles_styler.cx("relative inline-flex items-center justify-center box-border overflow-hidden", "border-solid select-none uds-nested-radius", "transition-[color,border-color,box-shadow] duration-[180ms] ease-[cubic-bezier(0,0,0.2,1)]", "uds-ring", !disabled && !hidden && "cursor-pointer", disabled && "cursor-not-allowed opacity-50", hidden && "pointer-events-none hidden", rootClass, className);
	return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
		...rest,
		ref,
		type: "button",
		className: styles,
		onClick: hidden ? void 0 : onClick,
		disabled,
		"aria-hidden": hidden || void 0,
		"data-paddle-button-hidden": hidden ? "true" : void 0,
		"data-paddle-button-role": paddleRole,
		children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
			"aria-hidden": true,
			className: require_styles_styler.cx("absolute inset-0 -z-10 pointer-events-none rounded-[var(--uds-nested-radius)]", "transition-[background-color,opacity] duration-[180ms] ease-[cubic-bezier(0,0,0.2,1)]", backgroundClass)
		}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Icon.Icon, {
			size: "md",
			name: resolvedIcon,
			color: "current",
			className: require_styles_styler.cx(iconSizeClass, iconVariantClass)
		})]
	});
});
PaddleButton.displayName = "PaddleButton";
//#endregion
exports.PaddleButton = PaddleButton;
