"use client";
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
import { cx, getStyles } from "../../../styles/styler.js";
import { HStack } from "../../HStack.js";
import { IconSlot } from "../../IconSlot.js";
import { memo } from "react";
import { jsx, jsxs } from "react/jsx-runtime";

//#region src/components/client/Input/InputHelpTextInternal.tsx
function InputHelpTextInternal({ startIcon, endIcon, iconProps, children, size, isFilled, ...rest }) {
	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 props = {
		...defaultIconProps,
		...iconProps
	};
	return /* @__PURE__ */ jsxs(HStack, {
		gap: "1",
		alignItems: "center",
		...rest,
		children: [
			startIcon && /* @__PURE__ */ jsx(IconSlot, {
				icon: startIcon,
				...props,
				iconProps,
				className: classNames.helperIcon
			}),
			/* @__PURE__ */ jsx("span", {
				className: classNames.helperText,
				children
			}),
			endIcon && /* @__PURE__ */ jsx(IconSlot, {
				icon: endIcon,
				...props,
				iconProps,
				className: classNames.helperIcon
			})
		]
	});
}
InputHelpTextInternal.displayName = "InputHelpTextInternal";
const InputHelpTextInternalMemo = memo(InputHelpTextInternal);

//#endregion
export { InputHelpTextInternalMemo as InputHelpTextInternal };