"use client";
const require_get_size = require("../../core/utils/get-size/get-size.cjs");
const require_create_vars_resolver = require("../../core/styles-api/create-vars-resolver/create-vars-resolver.cjs");
const require_get_theme_color = require("../../core/MantineProvider/color-functions/get-theme-color/get-theme-color.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_Loader_module = require("./Loader.module.cjs");
const require_Bars = require("./loaders/Bars.cjs");
const require_Dots = require("./loaders/Dots.cjs");
const require_Oval = require("./loaders/Oval.cjs");
let react_jsx_runtime = require("react/jsx-runtime");
//#region packages/@mantine/core/src/components/Loader/Loader.tsx
const defaultLoaders = {
	bars: require_Bars.Bars,
	oval: require_Oval.Oval,
	dots: require_Dots.Dots
};
const defaultProps = {
	loaders: defaultLoaders,
	type: "oval"
};
const varsResolver = require_create_vars_resolver.createVarsResolver((theme, { size, color }) => ({ root: {
	"--loader-size": require_get_size.getSize(size, "loader-size"),
	"--loader-color": color ? require_get_theme_color.getThemeColor(color, theme) : void 0
} }));
const Loader = require_factory.factory((_props) => {
	const props = require_use_props.useProps("Loader", defaultProps, _props);
	const { size, color, type, vars, className, style, classNames, styles, unstyled, loaders, variant, children, attributes, ...others } = props;
	const getStyles = require_use_styles.useStyles({
		name: "Loader",
		props,
		classes: require_Loader_module.default,
		className,
		style,
		classNames,
		styles,
		unstyled,
		attributes,
		vars,
		varsResolver
	});
	if (children) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Box.Box, {
		...getStyles("root"),
		...others,
		children
	});
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Box.Box, {
		...getStyles("root"),
		component: loaders[type],
		variant,
		size,
		...others
	});
});
Loader.defaultLoaders = defaultLoaders;
Loader.classes = require_Loader_module.default;
Loader.varsResolver = varsResolver;
Loader.displayName = "@mantine/core/Loader";
//#endregion
exports.Loader = Loader;
exports.defaultLoaders = defaultLoaders;

//# sourceMappingURL=Loader.cjs.map