try {
	let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
	n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "15c6b414-e1ef-4fd5-bf73-2e4230b54d12", e._sentryDebugIdIdentifier = "sentry-dbid-15c6b414-e1ef-4fd5-bf73-2e4230b54d12");
} catch (e) {}
import { a as Icon } from "./translation-Br5wIPO-.js";
import { t as Avatar } from "./Avatar-4gshS6xA.js";
import cx from "classnames";
import { Fragment, jsx, jsxs } from "preact/jsx-runtime";
var ListItem_module_default = {
	"list-item": "adyen-kyc-list-item",
	listItem: "adyen-kyc-list-item",
	"list-item-interactive": "adyen-kyc-list-item-interactive",
	listItemInteractive: "adyen-kyc-list-item-interactive",
	"list-item-text": "adyen-kyc-list-item-text",
	listItemText: "adyen-kyc-list-item-text",
	"list-item-title": "adyen-kyc-list-item-title",
	listItemTitle: "adyen-kyc-list-item-title",
	"list-item-description": "adyen-kyc-list-item-description",
	listItemDescription: "adyen-kyc-list-item-description",
	"list-item-disclosure": "adyen-kyc-list-item-disclosure",
	listItemDisclosure: "adyen-kyc-list-item-disclosure",
	"list-item-accessory": "adyen-kyc-list-item-accessory",
	listItemAccessory: "adyen-kyc-list-item-accessory"
};
//#endregion
//#region src/components/ui/atoms/ListItem/ListItem.tsx
var ListItem = ({ accessory, action, avatar, description, title }) => {
	const isInteractive = !!action && typeof action.onClick === "function";
	const isDisabled = !!action?.disabled;
	const listItemAvatar = {
		...avatar,
		...isDisabled && { variant: "disabled" }
	};
	const rootClassname = cx(ListItem_module_default.listItem, { [ListItem_module_default.listItemInteractive]: isInteractive });
	const content = /* @__PURE__ */ jsxs(Fragment, { children: [
		avatar && /* @__PURE__ */ jsx(Avatar, { ...listItemAvatar }),
		/* @__PURE__ */ jsxs("div", {
			className: ListItem_module_default.listItemText,
			children: [/* @__PURE__ */ jsx("h3", {
				className: ListItem_module_default.listItemTitle,
				children: title
			}), description && /* @__PURE__ */ jsx("span", {
				className: ListItem_module_default.listItemDescription,
				children: description
			})]
		}),
		accessory && /* @__PURE__ */ jsx("div", {
			className: ListItem_module_default.listItemAccessory,
			children: accessory
		})
	] });
	if (isInteractive) return /* @__PURE__ */ jsxs("button", {
		"aria-label": title,
		className: rootClassname,
		disabled: isDisabled,
		onClick: action.onClick,
		type: "button",
		children: [content, action?.disclosure && !isDisabled && /* @__PURE__ */ jsx("div", {
			className: ListItem_module_default.listItemDisclosure,
			"data-testid": "disclosure-indicator",
			children: /* @__PURE__ */ jsx(Icon, { name: "chevron-right" })
		})]
	});
	else return /* @__PURE__ */ jsx("div", {
		className: rootClassname,
		children: content
	});
};
//#endregion
export { ListItem as t };
