"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_gradient = require("../../core/MantineProvider/color-functions/get-gradient/get-gradient.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_polymorphic_factory = require("../../core/factory/polymorphic-factory.cjs");
const require_Box = require("../../core/Box/Box.cjs");
const require_Text_module = require("./Text.module.cjs");
let react_jsx_runtime = require("react/jsx-runtime");
//#region packages/@mantine/core/src/components/Text/Text.tsx
function getTextTruncate(truncate) {
	if (truncate === "start") return "start";
	if (truncate === "end" || truncate) return "end";
}
const defaultProps = { inherit: false };
const varsResolver = require_create_vars_resolver.createVarsResolver((theme, { variant, lineClamp, gradient, size, textWrap }) => ({ root: {
	"--text-fz": require_get_size.getFontSize(size),
	"--text-lh": require_get_size.getLineHeight(size),
	"--text-gradient": variant === "gradient" ? require_get_gradient.getGradient(gradient, theme) : void 0,
	"--text-line-clamp": typeof lineClamp === "number" ? lineClamp.toString() : void 0,
	"--text-text-wrap": textWrap
} }));
const Text = require_polymorphic_factory.polymorphicFactory((_props) => {
	const props = require_use_props.useProps("Text", defaultProps, _props);
	const { lineClamp, truncate, inline, inherit, gradient, span, textWrap, __staticSelector, vars, className, style, classNames, styles, unstyled, variant, mod, size, attributes, ...others } = props;
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Box.Box, {
		...require_use_styles.useStyles({
			name: ["Text", __staticSelector],
			props,
			classes: require_Text_module.default,
			className,
			style,
			classNames,
			styles,
			unstyled,
			attributes,
			vars,
			varsResolver
		})("root", { focusable: true }),
		component: span ? "span" : "p",
		variant,
		mod: [{
			"data-truncate": getTextTruncate(truncate),
			"data-line-clamp": typeof lineClamp === "number",
			"data-inline": inline,
			"data-inherit": inherit
		}, mod],
		size,
		...others
	});
});
Text.classes = require_Text_module.default;
Text.varsResolver = varsResolver;
Text.displayName = "@mantine/core/Text";
//#endregion
exports.Text = Text;

//# sourceMappingURL=Text.cjs.map