"use client";
const require_rem = require("../../core/utils/units-converters/rem.cjs");
const require_create_vars_resolver = require("../../core/styles-api/create-vars-resolver/create-vars-resolver.cjs");
const require_use_props = require("../../core/MantineProvider/use-props/use-props.cjs");
const require_use_styles = require("../../core/styles-api/use-styles/use-styles.cjs");
const require_factory = require("../../core/factory/factory.cjs");
const require_Box = require("../../core/Box/Box.cjs");
const require_ScrollArea = require("../ScrollArea/ScrollArea.cjs");
const require_Table_module = require("./Table.module.cjs");
let react_jsx_runtime = require("react/jsx-runtime");
//#region packages/@mantine/core/src/components/Table/TableScrollContainer.tsx
const defaultProps = { type: "scrollarea" };
const varsResolver = require_create_vars_resolver.createVarsResolver((_, { minWidth, maxHeight, type }) => ({ scrollContainer: {
	"--table-min-width": require_rem.rem(minWidth),
	"--table-max-height": require_rem.rem(maxHeight),
	"--table-overflow": type === "native" ? "auto" : void 0
} }));
const TableScrollContainer = require_factory.factory((_props) => {
	const props = require_use_props.useProps("TableScrollContainer", defaultProps, _props);
	const { classNames, className, style, styles, unstyled, vars, children, minWidth, maxHeight, type, scrollAreaProps, attributes, ...others } = props;
	const getStyles = require_use_styles.useStyles({
		name: "TableScrollContainer",
		classes: require_Table_module.default,
		props,
		className,
		style,
		classNames,
		styles,
		unstyled,
		attributes,
		vars,
		varsResolver,
		rootSelector: "scrollContainer"
	});
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Box.Box, {
		component: type === "scrollarea" ? require_ScrollArea.ScrollArea : "div",
		...type === "scrollarea" ? maxHeight ? {
			offsetScrollbars: "xy",
			...scrollAreaProps
		} : {
			offsetScrollbars: "x",
			...scrollAreaProps
		} : {},
		...getStyles("scrollContainer"),
		...others,
		children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
			...getStyles("scrollContainerInner"),
			children
		})
	});
});
TableScrollContainer.classes = require_Table_module.default;
TableScrollContainer.varsResolver = varsResolver;
TableScrollContainer.displayName = "@mantine/core/TableScrollContainer";
//#endregion
exports.TableScrollContainer = TableScrollContainer;

//# sourceMappingURL=TableScrollContainer.cjs.map