"use client";
const require_use_props = require("../../../core/MantineProvider/use-props/use-props.cjs");
const require_factory = require("../../../core/factory/factory.cjs");
const require_Box = require("../../../core/Box/Box.cjs");
const require_List_context = require("../List.context.cjs");
const require_List_module = require("../List.module.cjs");
let react_jsx_runtime = require("react/jsx-runtime");
//#region packages/@mantine/core/src/components/List/ListItem/ListItem.tsx
const ListItem = require_factory.factory((_props) => {
	const { classNames, className, style, styles, vars, icon, children, mod, ...others } = require_use_props.useProps("ListItem", null, _props);
	const ctx = require_List_context.useListContext();
	const _icon = icon || ctx.icon;
	const stylesApiProps = {
		classNames,
		styles
	};
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Box.Box, {
		...ctx.getStyles("item", {
			...stylesApiProps,
			className,
			style
		}),
		component: "li",
		mod: [{
			"with-icon": !!_icon,
			centered: ctx.center
		}, mod],
		...others,
		children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
			...ctx.getStyles("itemWrapper", stylesApiProps),
			children: [_icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
				...ctx.getStyles("itemIcon", stylesApiProps),
				children: _icon
			}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
				...ctx.getStyles("itemLabel", stylesApiProps),
				children
			})]
		})
	});
});
ListItem.classes = require_List_module.default;
ListItem.displayName = "@mantine/core/ListItem";
//#endregion
exports.ListItem = ListItem;

//# sourceMappingURL=ListItem.cjs.map