"use client";
const require_Mantine_context = require("../../../core/MantineProvider/Mantine.context.cjs");
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_Tabs_context = require("../Tabs.context.cjs");
const require_Tabs_module = require("../Tabs.module.cjs");
let react = require("react");
let react_jsx_runtime = require("react/jsx-runtime");
//#region packages/@mantine/core/src/components/Tabs/TabsPanel/TabsPanel.tsx
const TabsPanel = require_factory.factory((_props) => {
	const props = require_use_props.useProps("TabsPanel", null, _props);
	const { children, className, value, classNames, styles, style, mod, keepMounted, ...others } = props;
	const env = require_Mantine_context.useMantineEnv();
	const ctx = require_Tabs_context.useTabsContext();
	const active = ctx.value === value;
	const shouldKeepMounted = ctx.keepMounted || keepMounted;
	const useActivity = ctx.keepMountedMode !== "display-none";
	const content = shouldKeepMounted && useActivity && env !== "test" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Activity, {
		mode: active ? "visible" : "hidden",
		children
	}) : shouldKeepMounted ? children : active ? children : null;
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Box.Box, {
		...ctx.getStyles("panel", {
			className,
			classNames,
			styles,
			style: [style, !active ? { display: "none" } : void 0],
			props
		}),
		mod: [{ orientation: ctx.orientation }, mod],
		role: "tabpanel",
		id: ctx.getPanelId(value),
		"aria-labelledby": ctx.getTabId(value),
		...others,
		children: content
	});
});
TabsPanel.classes = require_Tabs_module.default;
TabsPanel.displayName = "@mantine/core/TabsPanel";
//#endregion
exports.TabsPanel = TabsPanel;

//# sourceMappingURL=TabsPanel.cjs.map