/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
"use client";
import { cx, getStyles } from "../../styles/styler.js";
import { IconSlot } from "../../components/IconSlot.js";
import { Box } from "../../components/Box.js";
import { jsx, jsxs } from "react/jsx-runtime";
//#region src/css-animation/Switch/SwitchStaticHandle.tsx
function SwitchStaticHandle({ size, isOn, isOnTranslateClass, cssAnimationDuration, disabled, onIcon, offIcon, handleSlotProps }) {
	const classNames = {
		handle: getStyles({
			switchSizeHandle: size,
			className: cx("relative", "pointer-events-none", "uds-border-radius-full", "overflow-hidden")
		}),
		handleCircle: getStyles({
			switchVariantActiveHandle: isOn ? "on" : "off",
			switchVariantHandle: "default",
			className: cx("absolute", "top-0", "left-0", "right-0", "bottom-0", "opacity-95", !disabled && "group-hover:opacity-100", cssAnimationDuration, "transition-[background-color,box-shadow,opacity]")
		}),
		handleIcon: getStyles({
			switchSizeHandleIcon: size,
			switchVariantHandleIcon: "default",
			switchVariantActiveHandleIcon: isOn ? "on" : "off",
			className: cx("absolute", "opacity-0", "top-1/2", "left-1/2", "transform", "translate-x-[-50%]", "translate-y-[-50%]", cssAnimationDuration, "transition-opacity")
		})
	};
	return /* @__PURE__ */ jsxs(Box, {
		className: cx(classNames.handle, isOn ? isOnTranslateClass : "translate-x-0", "opacity-95", !disabled && "group-hover:opacity-100", !disabled && "group-hover:scale-105", cssAnimationDuration, "transition-[transform,opacity]"),
		...handleSlotProps,
		children: [
			/* @__PURE__ */ jsx(Box, { className: classNames.handleCircle }),
			onIcon && /* @__PURE__ */ jsx(IconSlot, {
				icon: onIcon,
				iconProps: {
					variant: "fill",
					size: "sm"
				},
				"data-testid": "on-icon",
				className: cx(classNames.handleIcon, isOn ? "opacity-100" : "opacity-0")
			}),
			offIcon && /* @__PURE__ */ jsx(IconSlot, {
				icon: offIcon,
				iconProps: {
					variant: "fill",
					size: "sm"
				},
				"data-testid": "off-icon",
				className: cx(classNames.handleIcon, !isOn ? "opacity-100" : "opacity-0")
			})
		]
	});
}
SwitchStaticHandle.displayName = "SwitchStaticHandle";
//#endregion
export { SwitchStaticHandle };
