/*! © 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_client_Pressable = require("../Pressable.cjs");
const require_components_IconSlot = require("../../IconSlot.cjs");
const require_utils_mergeSlotProps = require("../../../utils/mergeSlotProps.cjs");
const require_components_client_Chip_ChipBase = require("./ChipBase.cjs");
let _yahoo_uds_icons = require("@yahoo/uds-icons");
let react = require("react");
react = require_runtime.__toESM(react);
let react_jsx_runtime = require("react/jsx-runtime");
//#region src/components/client/Chip/ChipDismissible.tsx
const ChipDismissible = (0, react.forwardRef)(function ChipDismissible({ dismissButtonAriaLabel, onDismiss, dismissIcon, variant = require_components_client_Chip_ChipBase.VARIANT_DEFAULT, disabled, slotProps, className, ...rest }, ref) {
	const classNames = (0, react.useMemo)(() => ({
		root: require_styles_styler.getStyles({
			chipDismissibleVariantRoot: variant,
			className
		}),
		icon: require_styles_styler.getStyles({ chipDismissibleVariantIcon: variant }),
		iconPressable: require_styles_styler.cx("uds-chip-dismissible-button", "uds-hit-target", "uds-ring", "rounded-full")
	}), [className, variant]);
	/**
	* Handlers
	*/
	const handleDismissClick = (0, react.useCallback)((e) => {
		e.stopPropagation();
		onDismiss?.();
	}, [onDismiss]);
	const mergedSlotProps = require_utils_mergeSlotProps.mergeSlotProps(slotProps, {
		startIcon: { className: classNames.icon },
		endIcon: { className: classNames.icon }
	});
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_client_Chip_ChipBase.ChipBase, {
		ref,
		disabled,
		tabIndex: -1,
		endIcon: (iconProps) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_client_Pressable.Pressable, {
			"aria-label": dismissButtonAriaLabel,
			className: classNames.iconPressable,
			onClick: handleDismissClick,
			disabled,
			children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_IconSlot.IconSlot, {
				icon: dismissIcon ?? _yahoo_uds_icons.Cross,
				iconProps
			})
		}),
		className: classNames.root,
		slotProps: mergedSlotProps,
		...rest
	});
});
ChipDismissible.displayName = "ChipDismissible";
//#endregion
exports.ChipDismissible = ChipDismissible;
