import { jsx as _jsx } from "react/jsx-runtime";
import { forwardRef } from "react";
import { useOneUIConfig } from "../../context/OneUIProvider";
import Styles from "./Text.module.scss";
export function _Text({ type, children, className = "", ...otherProps }, _ref) {
    const classNameType = useOneUIConfig("component.text.className", {});
    const tagByType = useOneUIConfig("component.text.htmlTag", {});
    const TagType = tagByType[type] || "p";
    return (_jsx(TagType, { ref: _ref, className: `${Styles.text} ${classNameType[type]} ${className} ${otherProps.onClick ? Styles.iteractible : ""}`, ...otherProps, children: children }));
}
/**
 * A component to hold all text variantions
 **/
const Text = forwardRef(_Text);
/**
 * A reusable component that displays styled text with different sizes and colors.
 * It automatically applies the correct HTML tag and styling based on the text type.
 */
export default Text;
//# sourceMappingURL=Text.js.map