"use client";
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_get_title_size = require("./get-title-size.cjs");
const require_Title_module = require("./Title.module.cjs");
let react_jsx_runtime = require("react/jsx-runtime");
//#region packages/@mantine/core/src/components/Title/Title.tsx
const defaultProps = { order: 1 };
const varsResolver = require_create_vars_resolver.createVarsResolver((_, { order, size, lineClamp, textWrap }) => {
	const sizeVariables = require_get_title_size.getTitleSize(order || 1, size);
	return { root: {
		"--title-fw": sizeVariables.fontWeight,
		"--title-lh": sizeVariables.lineHeight,
		"--title-fz": sizeVariables.fontSize,
		"--title-line-clamp": typeof lineClamp === "number" ? lineClamp.toString() : void 0,
		"--title-text-wrap": textWrap
	} };
});
const Title = require_factory.factory((_props) => {
	const props = require_use_props.useProps("Title", defaultProps, _props);
	const { classNames, className, style, styles, unstyled, order, vars, size, variant, lineClamp, textWrap, mod, attributes, ...others } = props;
	const getStyles = require_use_styles.useStyles({
		name: "Title",
		props,
		classes: require_Title_module.default,
		className,
		style,
		classNames,
		styles,
		unstyled,
		attributes,
		vars,
		varsResolver
	});
	if (![
		1,
		2,
		3,
		4,
		5,
		6
	].includes(order)) return null;
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Box.Box, {
		...getStyles("root"),
		component: `h${order}`,
		variant,
		mod: [{
			order,
			"data-line-clamp": typeof lineClamp === "number"
		}, mod],
		size,
		...others
	});
});
Title.classes = require_Title_module.default;
Title.varsResolver = varsResolver;
Title.displayName = "@mantine/core/Title";
//#endregion
exports.Title = Title;

//# sourceMappingURL=Title.cjs.map