/*! © 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_styles_styler = require("../../styles/styler.cjs");
const require_components_Box = require("../../components/Box.cjs");
const require_components_client_Radio_RadioBase = require("../../components/client/Radio/RadioBase.cjs");
let react = require("react");
react = require_runtime.__toESM(react);
let react_jsx_runtime = require("react/jsx-runtime");
//#region src/css-animation/Radio/Radio.tsx
/**
* CSS-animation Radio variant. This component intentionally never imports motion.
*
* @componentType Client component
*
* @example
* ```tsx
* 'use client';
* import { Radio } from '@yahoo/uds/css-animation';
*
* <Radio label="Name" />
* ```
*/
const Radio = (0, react.forwardRef)(function Radio(props, parentRef) {
	const cssAnimationDuration = "duration-120";
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_client_Radio_RadioBase.RadioBase, {
		...props,
		ref: parentRef,
		cssAnimationDuration,
		renderRoot: ({ className, style, rootSlotProps, hasLabel, children }) => {
			return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(hasLabel ? "label" : "div", {
				className: require_styles_styler.cx("group", className),
				"data-testid": "container",
				style,
				tabIndex: -1,
				...rootSlotProps,
				children
			});
		},
		renderIndicator: ({ size, variant, checked, disabled, cssAnimationDuration, radioSlotProps, radioIconSlotProps, children }) => {
			const classNames = {
				radio: require_styles_styler.getStyles({
					radioSizeRadio: size,
					radioVariantRadio: variant,
					radioVariantValueRadio: checked ? "checked" : "unchecked",
					className: require_styles_styler.cx([
						"border",
						"uds-ring",
						"uds-ring-within",
						!disabled && "group-hover:scale-110",
						!disabled && !checked && "group-active:scale-90",
						!disabled && !checked && "group-active:uds-inset-shadow-lg-invert",
						!disabled && checked && "group-hover:uds-inset-shadow-lg-invert",
						cssAnimationDuration,
						"transition-[background-color,border-color,transform]",
						"transition-shadow"
					])
				}),
				radioCircle: require_styles_styler.getStyles({
					radioVariantRadioCircle: variant,
					radioVariantValueRadioCircle: checked ? "checked" : "unchecked",
					className: require_styles_styler.cx([
						"pointer-events-none",
						"w-[8px]",
						"h-[8px]",
						checked ? "opacity-100" : "opacity-0",
						cssAnimationDuration,
						"transition-opacity"
					])
				})
			};
			return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_components_Box.Box, {
				position: "relative",
				borderRadius: "full",
				alignItems: "center",
				justifyContent: "center",
				flex: "none",
				className: classNames.radio,
				...radioSlotProps,
				children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Box.Box, {
					borderRadius: "full",
					className: classNames.radioCircle,
					...radioIconSlotProps
				})]
			});
		}
	});
});
Radio.displayName = "Radio";
//#endregion
exports.Radio = Radio;
