/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
"use client";
import { cx, getStyles } from "../../../styles/styler.js";
import { IconSlot } from "../../IconSlot.js";
import { HStack } from "../../HStack.js";
import { forwardRef, memo } from "react";
import { jsx, jsxs } from "react/jsx-runtime";
//#region src/components/client/Input/InputHelpTextInternal.tsx
const InputHelpTextInternal = forwardRef(function InputHelpTextInternal({ startIcon, endIcon, iconProps, children, size, isFilled, slotProps, ...rest }, ref) {
	const defaultIconProps = { variant: "outline" };
	const classNames = {
		helperText: cx(getStyles({
			inputSizeHelperText: size,
			inputVariantHelperText: "default",
			inputVariantValueHelperText: !isFilled ? "empty" : "filled"
		})),
		helperIcon: getStyles({
			inputSizeHelperIcon: size,
			inputVariantHelperIcon: "default",
			inputVariantValueHelperIcon: !isFilled ? "empty" : "filled"
		})
	};
	const { className: startIconClassName, ...startIconSlotProps } = slotProps?.startIcon ?? {};
	const { className: endIconClassName, ...endIconSlotProps } = slotProps?.endIcon ?? {};
	const { className: textClassName, ...textSlotProps } = slotProps?.text ?? {};
	const props = {
		...defaultIconProps,
		...iconProps
	};
	return /* @__PURE__ */ jsxs(HStack, {
		gap: "1",
		alignItems: "center",
		ref,
		...rest,
		children: [
			startIcon && /* @__PURE__ */ jsx(IconSlot, {
				icon: startIcon,
				...props,
				iconProps: {
					...iconProps,
					...startIconSlotProps
				},
				className: cx(classNames.helperIcon, startIconClassName)
			}),
			/* @__PURE__ */ jsx("span", {
				className: cx(classNames.helperText, textClassName),
				...textSlotProps,
				children
			}),
			endIcon && /* @__PURE__ */ jsx(IconSlot, {
				icon: endIcon,
				...props,
				iconProps: {
					...iconProps,
					...endIconSlotProps
				},
				className: cx(classNames.helperIcon, endIconClassName)
			})
		]
	});
});
InputHelpTextInternal.displayName = "InputHelpTextInternal";
const InputHelpTextInternalMemo = memo(InputHelpTextInternal);
//#endregion
export { InputHelpTextInternalMemo as InputHelpTextInternal };
