/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-0d43332 | Cube Dev Team */
import { mergeProps } from "../../../utils/react/mergeProps.js";
import { resolveIcon } from "../../../utils/react/resolveIcon.js";
import { highlightText } from "../highlightText.js";
import { useAutoTooltip } from "../use-auto-tooltip.js";
import { DANGER_CARD_STYLES, DANGER_CLEAR_STYLES, DANGER_ITEM_STYLES, DANGER_LINK_STYLES, DANGER_NEUTRAL_STYLES, DANGER_OUTLINE_STYLES, DANGER_PRIMARY_STYLES, DANGER_SECONDARY_STYLES, DEFAULT_CARD_STYLES, DEFAULT_CLEAR_STYLES, DEFAULT_ITEM_STYLES, DEFAULT_LINK_STYLES, DEFAULT_NEUTRAL_STYLES, DEFAULT_OUTLINE_STYLES, DEFAULT_PRIMARY_STYLES, DEFAULT_SECONDARY_STYLES, NOTE_CARD_STYLES, NOTE_CLEAR_STYLES, NOTE_ITEM_STYLES, NOTE_LINK_STYLES, NOTE_NEUTRAL_STYLES, NOTE_OUTLINE_STYLES, NOTE_PRIMARY_STYLES, NOTE_SECONDARY_STYLES, SPECIAL_CLEAR_STYLES, SPECIAL_ITEM_STYLES, SPECIAL_LINK_STYLES, SPECIAL_NEUTRAL_STYLES, SPECIAL_OUTLINE_STYLES, SPECIAL_PRIMARY_STYLES, SPECIAL_SECONDARY_STYLES, SUCCESS_CARD_STYLES, SUCCESS_CLEAR_STYLES, SUCCESS_ITEM_STYLES, SUCCESS_LINK_STYLES, SUCCESS_NEUTRAL_STYLES, SUCCESS_OUTLINE_STYLES, SUCCESS_PRIMARY_STYLES, SUCCESS_SECONDARY_STYLES, WARNING_CARD_STYLES, WARNING_CLEAR_STYLES, WARNING_ITEM_STYLES, WARNING_LINK_STYLES, WARNING_NEUTRAL_STYLES, WARNING_OUTLINE_STYLES, WARNING_PRIMARY_STYLES, WARNING_SECONDARY_STYLES } from "../../../data/item-themes.js";
import { CheckIcon } from "../../../icons/CheckIcon.js";
import { LoadingIcon } from "../../../icons/LoadingIcon.js";
import { ItemActionProvider } from "../../actions/ItemActionContext.js";
import { useWarn } from "../../../_internal/hooks/use-warn.js";
import { ItemAction } from "../../actions/ItemAction/ItemAction.js";
import { ItemBadge } from "../ItemBadge/ItemBadge.js";
import { IconSwitch } from "../../helpers/IconSwitch/IconSwitch.js";
import { _HotKeys } from "../HotKeys/HotKeys.js";
import { CONTAINER_STYLES, tasty } from "@tenphi/tasty";
import { forwardRef, isValidElement, useMemo } from "react";
import { jsx, jsxs } from "react/jsx-runtime";
import { useHotkeys } from "react-hotkeys-hook";

//#region src/components/content/Item/Item.tsx
const ITEM_SIZE_VALUES = [
	"xsmall",
	"small",
	"medium",
	"large",
	"xlarge",
	"inline"
];
const DEFAULT_ICON_STYLES = {
	$: ">",
	display: "grid",
	placeItems: "center",
	placeContent: "stretch",
	aspectRatio: "1 / 1",
	width: "($size - 2bw)",
	opacity: {
		"": 1,
		"checkbox & selected": 1,
		"checkbox & !selected": 0,
		"checkbox & !selected & hovered": .4
	}
};
const ADDITION_STYLES = {
	$: ">",
	display: "grid",
	flow: "column",
	placeItems: "center",
	placeContent: "stretch"
};
const ACTIONS_EVENT_HANDLERS = {
	onClick: (e) => e.stopPropagation(),
	onPointerDown: (e) => e.stopPropagation(),
	onPointerUp: (e) => e.stopPropagation(),
	onMouseDown: (e) => e.stopPropagation(),
	onMouseUp: (e) => e.stopPropagation(),
	onKeyDown: (e) => {
		if (e.key === "Enter" || e.key === " ") e.stopPropagation();
	}
};
const ItemElement = tasty({
	as: "div",
	styles: {
		"@interacted": "active | :hover | :focus | :focus-within | :has([data-pressed])",
		display: "inline-grid",
		flow: "column dense",
		gap: 0,
		outline: 0,
		placeItems: "stretch",
		placeContent: "stretch",
		gridTemplate: {
			"": "\"icon prefix label suffix rightIcon actions\" auto \"icon prefix label suffix rightIcon actions\" auto / max-content max-content 1sf max-content max-content max-content",
			"description=inline": "\"icon prefix description suffix rightIcon actions\" auto / max-content max-content 1sf max-content max-content max-content",
			"description=inline & has-label": "\"icon prefix label suffix rightIcon actions\" auto \"icon prefix description suffix rightIcon actions\" auto / max-content max-content 1sf max-content max-content max-content",
			"description=block": "\"icon prefix label suffix rightIcon actions\" auto \"description description description description description description\" auto / max-content max-content 1sf max-content max-content max-content"
		},
		flexShrink: {
			"": "initial",
			"menuitem | listboxitem": 0
		},
		position: "relative",
		padding: {
			"": 0,
			"type=card": ".5x"
		},
		margin: 0,
		radius: {
			"": true,
			"shape=card": "1cr",
			"shape=button": true,
			"shape=sharp": "0",
			"shape=pill": "round"
		},
		height: {
			"": "min $size",
			"size=inline": "(1lh + 2bw)"
		},
		width: {
			"": "min $size",
			"has-icon & has-right-icon": "min ($size * 2)",
			"size=inline": "min (1lh + 2bw)"
		},
		border: "#clear",
		fill: {
			"": "#dark.0",
			"hovered | focused": "#dark.03",
			selected: "#dark.09",
			"selected & (hovered | focused)": "#dark.12",
			pressed: "#dark.09",
			disabled: "#clear"
		},
		color: {
			"": "#dark-02",
			hovered: "#dark-02",
			pressed: "#dark",
			disabled: "#dark-04"
		},
		preset: {
			"": "t3",
			"!type=item": "t3m",
			"size=xsmall": "t4",
			"size=xlarge": "t2",
			"size=inline": "inherit",
			"!type=item & (size=medium | size=small | size=large)": "t3m",
			"!type=item & size=xlarge": "t2m",
			"(type=header | type=card) & (size=xsmall | size=small | size=medium)": "h6",
			"(type=header | type=card) & size=large": "h5",
			"(type=header | type=card) & size=xlarge": "h4"
		},
		recipe: "reset button",
		transition: "theme",
		outlineOffset: 1,
		cursor: {
			"": "inherit",
			":is(a)": "pointer",
			":is(button) | listboxitem | menuitem": "$pointer",
			disabled: "not-allowed"
		},
		$size: {
			"": "$size-md",
			"size=xsmall": "$size-xs",
			"size=small": "$size-sm",
			"size=medium": "$size-md",
			"size=large": "$size-lg",
			"size=xlarge": "$size-xl",
			"size=inline": "(1lh + 2bw)"
		},
		"$inline-padding": "max($min-inline-padding, (($size - 1lh - 2bw) / 2 + $inline-compensation))",
		"$block-padding": {
			"": ".5x",
			"size=xsmall | size=small": ".25x",
			"size=inline": 0
		},
		"$inline-compensation": ".5x",
		"$min-inline-padding": "(1x - 1bw)",
		"$label-padding-left": {
			"": "$inline-padding",
			"has-start-content": "0"
		},
		"$label-padding-right": {
			"": "$inline-padding",
			"has-end-content": "0",
			"!inside-wrapper & !has-suffix & !has-right-icon & auto-hide-actions & !preserve-actions-space & !@interacted": "$inline-padding",
			"inside-wrapper & !has-suffix & !has-right-icon & !preserve-actions-space & !actions-shown": "$inline-padding"
		},
		"$label-padding-bottom": {
			"": "$block-padding",
			"description=inline": "0"
		},
		"$description-padding-left": {
			"": "$inline-padding",
			"has-start-content": 0,
			"description=block": "($inline-padding - $inline-compensation + 1bw)",
			"description=block & !has-start-content": "$inline-padding"
		},
		"$description-padding-right": {
			"": "$inline-padding",
			"has-end-content": 0,
			"description=block": "($inline-padding - $inline-compensation + 1bw)",
			"description=block & !has-end-content": "$inline-padding"
		},
		"$description-padding-bottom": {
			"": 0,
			"has-label & description=inline": "$block-padding",
			"has-label & description=block": "max($block-padding, (($size - 4x) / 2) + $block-padding)"
		},
		Icon: {
			...DEFAULT_ICON_STYLES,
			gridArea: "icon"
		},
		RightIcon: {
			...DEFAULT_ICON_STYLES,
			gridArea: "rightIcon"
		},
		Label: {
			$: ">",
			margin: 0,
			gridArea: "label",
			display: "block",
			placeSelf: "center start",
			boxSizing: "border-box",
			placeContent: "stretch",
			whiteSpace: "nowrap",
			overflow: "hidden",
			textOverflow: "ellipsis",
			width: "0 100%",
			preset: "inherit",
			transition: "padding",
			padding: "$block-padding $label-padding-right $label-padding-bottom $label-padding-left"
		},
		Description: {
			$: ">",
			gridArea: "description",
			preset: {
				"": "t4",
				"type=card | type=header": "t3"
			},
			placeSelf: "center start",
			boxSizing: "border-box",
			color: "inherit",
			opacity: {
				"": .75,
				"type=card | type=header": 1
			},
			overflow: "hidden",
			whiteSpace: {
				"": "nowrap",
				"type=card | type=header": "normal"
			},
			textOverflow: "ellipsis",
			width: "initial 100% 100%",
			textAlign: "left",
			padding: "0 $description-padding-right $description-padding-bottom $description-padding-left"
		},
		Prefix: {
			...ADDITION_STYLES,
			gridArea: "prefix",
			padding: {
				"": "$inline-padding left",
				"has-icon": 0
			}
		},
		Suffix: {
			...ADDITION_STYLES,
			gridArea: "suffix",
			padding: {
				"": "$inline-padding right",
				"has-right-icon": 0
			}
		},
		Actions: {
			$: ">",
			gridArea: "actions",
			display: "flex",
			gap: "1bw",
			placeItems: "center",
			placeContent: "end",
			placeSelf: "stretch",
			padding: {
				"": "0 $side-padding",
				"inside-wrapper & !actions-shown": 0
			},
			boxSizing: "border-box",
			height: "min ($size - 2bw)",
			width: {
				"": "fixed ($actions-width, 0px)",
				"has-actions-content & !auto-hide-actions": "max calc-size(max-content, size)",
				"has-actions-content & auto-hide-actions & !preserve-actions-space": "max 0px",
				"has-actions-content & auto-hide-actions & (!preserve-actions-space & ((@interacted & !inside-wrapper) | (inside-wrapper & actions-shown)))": "max calc-size(max-content, size)",
				"has-actions-content & auto-hide-actions & preserve-actions-space": "max calc-size(max-content, size)"
			},
			opacity: {
				"": 1,
				"auto-hide-actions": 0,
				"auto-hide-actions & ((@interacted & !inside-wrapper) | (inside-wrapper & actions-shown))": 1
			},
			transition: "width $transition ease-out, opacity $transition ease-out, padding $transition ease-out",
			interpolateSize: "allow-keywords",
			"$action-size": "min(max((2x + 2bw), ($size - 1x - 2bw)), (3x - 2bw))",
			"$side-padding": "(($size - $action-size - 2bw) / 2)"
		}
	},
	variants: {
		"default.primary": DEFAULT_PRIMARY_STYLES,
		"default.secondary": DEFAULT_SECONDARY_STYLES,
		"default.outline": DEFAULT_OUTLINE_STYLES,
		"default.neutral": DEFAULT_NEUTRAL_STYLES,
		"default.clear": DEFAULT_CLEAR_STYLES,
		"default.link": DEFAULT_LINK_STYLES,
		"default.item": DEFAULT_ITEM_STYLES,
		"default.card": DEFAULT_CARD_STYLES,
		"danger.primary": DANGER_PRIMARY_STYLES,
		"danger.secondary": DANGER_SECONDARY_STYLES,
		"danger.outline": DANGER_OUTLINE_STYLES,
		"danger.neutral": DANGER_NEUTRAL_STYLES,
		"danger.clear": DANGER_CLEAR_STYLES,
		"danger.link": DANGER_LINK_STYLES,
		"danger.item": DANGER_ITEM_STYLES,
		"danger.card": DANGER_CARD_STYLES,
		"success.primary": SUCCESS_PRIMARY_STYLES,
		"success.secondary": SUCCESS_SECONDARY_STYLES,
		"success.outline": SUCCESS_OUTLINE_STYLES,
		"success.neutral": SUCCESS_NEUTRAL_STYLES,
		"success.clear": SUCCESS_CLEAR_STYLES,
		"success.link": SUCCESS_LINK_STYLES,
		"success.item": SUCCESS_ITEM_STYLES,
		"success.card": SUCCESS_CARD_STYLES,
		"warning.primary": WARNING_PRIMARY_STYLES,
		"warning.secondary": WARNING_SECONDARY_STYLES,
		"warning.outline": WARNING_OUTLINE_STYLES,
		"warning.neutral": WARNING_NEUTRAL_STYLES,
		"warning.clear": WARNING_CLEAR_STYLES,
		"warning.link": WARNING_LINK_STYLES,
		"warning.item": WARNING_ITEM_STYLES,
		"warning.card": WARNING_CARD_STYLES,
		"note.primary": NOTE_PRIMARY_STYLES,
		"note.secondary": NOTE_SECONDARY_STYLES,
		"note.outline": NOTE_OUTLINE_STYLES,
		"note.neutral": NOTE_NEUTRAL_STYLES,
		"note.clear": NOTE_CLEAR_STYLES,
		"note.link": NOTE_LINK_STYLES,
		"note.item": NOTE_ITEM_STYLES,
		"note.card": NOTE_CARD_STYLES,
		"special.primary": SPECIAL_PRIMARY_STYLES,
		"special.secondary": SPECIAL_SECONDARY_STYLES,
		"special.outline": SPECIAL_OUTLINE_STYLES,
		"special.neutral": SPECIAL_NEUTRAL_STYLES,
		"special.clear": SPECIAL_CLEAR_STYLES,
		"special.link": SPECIAL_LINK_STYLES,
		"special.item": SPECIAL_ITEM_STYLES
	},
	styleProps: CONTAINER_STYLES
});
const Item = (props, ref) => {
	let { children, size = "medium", type = "item", theme = "default", mods, icon: iconProp, rightIcon: rightIconProp, prefix, suffix, description, descriptionPlacement, labelProps, descriptionProps, keyboardShortcutProps, styles, htmlType, isSelected, hotkeys, tooltip = true, isDisabled, style, loadingSlot = "auto", isLoading = false, actions, autoHideActions = false, preserveActionsSpace = false, disableActionsFocus = false, shape, defaultTooltipPlacement = "top", level = 3, highlight, highlightCaseSensitive = false, highlightStyles, insideWrapper = false, showActions = false, ...rest } = props;
	const hasLabel = !!(children || labelProps);
	const finalDescriptionPlacement = descriptionPlacement ?? ((type === "card" || type === "header") && hasLabel ? "block" : "inline");
	const finalShape = shape ?? (type === "card" ? "card" : "button");
	const finalIsDisabled = isDisabled === true || isLoading && isDisabled !== false;
	useWarn(type === "header" && !["default"].includes(theme) || type === "card" && ![
		"default",
		"success",
		"danger",
		"warning",
		"note"
	].includes(theme) || !["header", "card"].includes(type) && ![
		"default",
		"success",
		"danger",
		"warning",
		"note",
		"special"
	].includes(theme), {
		key: [
			"Item",
			"invalid-type-theme",
			type,
			theme
		],
		args: [`Item: Invalid type+theme combination. type="${type}" does not support theme="${theme}".` + (type === "header" ? " The \"header\" type only supports theme: default." : type === "card" ? " The \"card\" type only supports themes: default, success, danger, warning, note." : " Standard types support themes: default, success, danger, warning, note, special.")]
	});
	const hasLinkWithIcons = type === "link" && (iconProp || rightIconProp);
	const hasLinkWithLoading = type === "link" && isLoading;
	const hasLinkRestrictions = hasLinkWithIcons || hasLinkWithLoading;
	const linkRestrictionMessages = [];
	if (hasLinkWithIcons) linkRestrictionMessages.push("icons (`icon` or `rightIcon` props)");
	if (hasLinkWithLoading) linkRestrictionMessages.push("loading state (`isLoading` prop)");
	useWarn(hasLinkRestrictions, {
		key: ["Item", "link-restrictions"],
		args: [`Item: The "link" type does not support ${linkRestrictionMessages.join(" or ")}. Remove these props when using type="link".`]
	});
	const hasCheckbox = iconProp === "checkbox";
	const isCustomSize = typeof size === "number" || !ITEM_SIZE_VALUES.includes(size);
	const sizeTokenValue = typeof size === "number" ? `${size}px` : isCustomSize ? size : void 0;
	const baseMods = useMemo(() => ({
		disabled: finalIsDisabled,
		selected: isSelected === true,
		loading: isLoading,
		...!isCustomSize && { size },
		type,
		theme,
		shape: finalShape,
		...mods
	}), [
		finalIsDisabled,
		isSelected,
		isLoading,
		size,
		isCustomSize,
		type,
		theme,
		finalShape,
		mods
	]);
	const resolvedIcon = useMemo(() => {
		if (hasCheckbox) return {
			content: null,
			hasSlot: true
		};
		return resolveIcon(iconProp, baseMods);
	}, [
		iconProp,
		baseMods,
		hasCheckbox
	]);
	const resolvedRightIcon = useMemo(() => resolveIcon(rightIconProp, baseMods), [rightIconProp, baseMods]);
	const resolvedLoadingSlot = useMemo(() => {
		if (loadingSlot !== "auto") return loadingSlot;
		if (resolvedRightIcon.hasSlot && !resolvedIcon.hasSlot) return "rightIcon";
		return "icon";
	}, [
		loadingSlot,
		resolvedIcon.hasSlot,
		resolvedRightIcon.hasSlot
	]);
	const hasIconSlot = resolvedIcon.hasSlot || isLoading && resolvedLoadingSlot === "icon";
	const hasRightIconSlot = resolvedRightIcon.hasSlot || isLoading && resolvedLoadingSlot === "rightIcon";
	const showDescription = useMemo(() => {
		const copyProps = { ...descriptionProps };
		delete copyProps.id;
		return !!(description || Object.keys(copyProps).length > 0);
	}, [description, descriptionProps]);
	const finalIcon = isLoading && resolvedLoadingSlot === "icon" ? /* @__PURE__ */ jsx(LoadingIcon, {}) : resolvedIcon.content;
	const finalRightIcon = isLoading && resolvedLoadingSlot === "rightIcon" ? /* @__PURE__ */ jsx(LoadingIcon, {}) : resolvedRightIcon.content;
	const iconKey = hasCheckbox ? "checkbox" : isLoading && resolvedLoadingSlot === "icon" ? "loading" : isValidElement(finalIcon) ? finalIcon.type?.displayName || finalIcon.type?.name || "icon" : finalIcon ? "icon" : "empty";
	const rightIconKey = isLoading && resolvedLoadingSlot === "rightIcon" ? "loading" : isValidElement(finalRightIcon) ? finalRightIcon.type?.displayName || finalRightIcon.type?.name || "icon" : finalRightIcon ? "icon" : "empty";
	const finalPrefix = isLoading && resolvedLoadingSlot === "prefix" ? /* @__PURE__ */ jsx(LoadingIcon, {}) : prefix;
	const finalSuffix = isLoading && resolvedLoadingSlot === "suffix" ? /* @__PURE__ */ jsx(LoadingIcon, {}) : suffix ?? (hotkeys ? /* @__PURE__ */ jsx(_HotKeys, {
		...keyboardShortcutProps,
		type: type === "primary" ? "primary" : "default",
		styles: {
			padding: "1x left",
			opacity: finalIsDisabled ? .5 : 1
		},
		children: hotkeys
	}) : void 0);
	useHotkeys(typeof hotkeys === "string" ? hotkeys.toLowerCase() : "", () => {
		if (!hotkeys) return;
		if (finalIsDisabled) return;
		if (ref && typeof ref === "object" && ref.current) ref.current.click();
	}, {
		enableOnContentEditable: true,
		enabled: !!hotkeys,
		preventDefault: true,
		enableOnFormTags: true
	}, [hotkeys, finalIsDisabled]);
	const finalMods = useMemo(() => {
		return {
			...baseMods,
			"has-icon": hasIconSlot,
			"has-start-content": !!(hasIconSlot || finalPrefix),
			"has-end-content": !!(hasRightIconSlot || finalSuffix || actions),
			"has-right-icon": hasRightIconSlot,
			"has-label": hasLabel,
			"has-prefix": !!finalPrefix,
			"has-suffix": !!finalSuffix,
			"has-description": showDescription,
			"has-actions": !!actions,
			"has-actions-content": !!(actions && actions !== true),
			"auto-hide-actions": autoHideActions === true,
			"preserve-actions-space": preserveActionsSpace === true,
			"inside-wrapper": insideWrapper,
			"actions-shown": showActions && insideWrapper,
			checkbox: hasCheckbox,
			description: showDescription ? finalDescriptionPlacement : "none"
		};
	}, [
		baseMods,
		hasIconSlot,
		hasRightIconSlot,
		finalPrefix,
		finalSuffix,
		showDescription,
		finalDescriptionPlacement,
		hasCheckbox,
		actions,
		autoHideActions,
		preserveActionsSpace,
		hasLabel,
		showActions,
		insideWrapper
	]);
	const { labelProps: finalLabelProps, labelRef, renderWithTooltip } = useAutoTooltip({
		tooltip,
		children,
		labelProps,
		isDynamicLabel: !!actions
	});
	const processedChildren = useMemo(() => {
		if (typeof children === "string" && highlight) return highlightText(children, highlight, highlightCaseSensitive, highlightStyles);
		return children;
	}, [
		children,
		highlight,
		highlightCaseSensitive,
		highlightStyles
	]);
	const renderItemElement = (tooltipTriggerProps, tooltipRef) => {
		const handleRef = (element) => {
			if (typeof ref === "function") ref(element);
			else if (ref) ref.current = element;
			if (tooltipRef) tooltipRef.current = element;
		};
		return /* @__PURE__ */ jsxs(ItemElement, {
			ref: handleRef,
			variant: theme && type ? `${type === "header" ? "default" : theme}.${type === "header" ? "item" : type}` : void 0,
			disabled: finalIsDisabled,
			"aria-disabled": finalIsDisabled,
			"aria-selected": isSelected,
			mods: finalMods,
			styles,
			tokens: sizeTokenValue ? { $size: sizeTokenValue } : void 0,
			type: htmlType,
			...mergeProps(rest, tooltipTriggerProps || {}),
			style,
			children: [
				hasIconSlot && /* @__PURE__ */ jsx("div", {
					"data-element": "Icon",
					children: /* @__PURE__ */ jsx(IconSwitch, {
						noWrapper: true,
						contentKey: iconKey,
						children: hasCheckbox ? /* @__PURE__ */ jsx(CheckIcon, {}) : finalIcon
					})
				}),
				finalPrefix && /* @__PURE__ */ jsx("div", {
					"data-element": "Prefix",
					children: finalPrefix
				}),
				children || labelProps ? /* @__PURE__ */ jsx(type === "header" || type === "card" ? `h${level}` : "div", {
					"data-element": "Label",
					...finalLabelProps,
					ref: labelRef,
					children: processedChildren
				}) : null,
				showDescription ? /* @__PURE__ */ jsx("div", {
					"data-element": "Description",
					...descriptionProps,
					children: description
				}) : null,
				finalSuffix && /* @__PURE__ */ jsx("div", {
					"data-element": "Suffix",
					children: finalSuffix
				}),
				hasRightIconSlot && /* @__PURE__ */ jsx("div", {
					"data-element": "RightIcon",
					children: /* @__PURE__ */ jsx(IconSwitch, {
						noWrapper: true,
						contentKey: rightIconKey,
						children: finalRightIcon
					})
				}),
				actions && /* @__PURE__ */ jsx("div", {
					"data-element": "Actions",
					...ACTIONS_EVENT_HANDLERS,
					children: actions !== true ? /* @__PURE__ */ jsx(ItemActionProvider, {
						type,
						theme,
						disableActionsFocus,
						isDisabled: finalIsDisabled,
						children: actions
					}) : null
				})
			]
		});
	};
	return renderWithTooltip(renderItemElement, defaultTooltipPlacement);
};
const _Item = Object.assign(forwardRef(Item), {
	Action: ItemAction,
	Badge: ItemBadge
});

//#endregion
export { _Item };
//# sourceMappingURL=Item.js.map