/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
"use client";
import { cx, getStyles } from "../../../styles/styler.js";
import { mergeSlotProps } from "../../../utils/mergeSlotProps.js";
import { ChipBase, VARIANT_DEFAULT } from "./ChipBase.js";
import { forwardRef, useMemo } from "react";
import { jsx } from "react/jsx-runtime";
//#region src/components/client/Chip/ChipButton.tsx
const ChipButton = forwardRef(function ChipButton({ variant = VARIANT_DEFAULT, slotProps, className, ...rest }, ref) {
	const classNames = useMemo(() => ({
		root: getStyles({
			chipLinkVariantRoot: variant,
			className: cx("uds-ring", className)
		}),
		icon: getStyles({ chipLinkVariantIcon: variant })
	}), [className, variant]);
	const mergedSlotProps = mergeSlotProps(slotProps, {
		startIcon: { className: classNames.icon },
		endIcon: { className: classNames.icon }
	});
	return /* @__PURE__ */ jsx(ChipBase, {
		as: "button",
		ref,
		tabIndex: 0,
		className: classNames.root,
		slotProps: mergedSlotProps,
		...rest
	});
});
ChipButton.displayName = "ChipButton";
//#endregion
export { ChipButton };
