'use strict';

var React = require('react');
var Typography = require('./Typography-cjs.js');

function Heading({ id, level = 5, children, element, maxLines = "unlimited", UNSAFE_className, UNSAFE_style, }) {
    const levelMap = {
        1: {
            element: "h1",
            size: "jumbo",
            fontWeight: "black",
            textColor: "heading",
        },
        2: {
            element: "h2",
            size: "largest",
            fontWeight: "bold",
            textColor: "heading",
        },
        3: {
            element: "h3",
            size: "larger",
            fontWeight: "bold",
            textColor: "heading",
        },
        4: {
            element: "h4",
            size: "large",
            fontWeight: "bold",
            textColor: "heading",
        },
        5: {
            element: "h5",
            size: "base",
            fontWeight: "bold",
            textColor: "heading",
        },
        6: {
            element: "h6",
            size: "small",
            textCase: "uppercase",
            fontWeight: "bold",
            textColor: "heading",
        },
    };
    const maxLineToNumber = {
        single: 1,
        small: 2,
        base: 4,
        large: 8,
        larger: 16,
        unlimited: undefined,
    };
    return (React.createElement(Typography.Typography, Object.assign({ id: id }, levelMap[level], { element: element || levelMap[level].element, numberOfLines: maxLineToNumber[maxLines], UNSAFE_className: UNSAFE_className, UNSAFE_style: UNSAFE_style }), children));
}

exports.Heading = Heading;
