"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = Headline;
const classnames_1 = __importDefault(require("classnames"));
const react_1 = __importDefault(require("react"));
function Headline(props) {
    const defaultedProps = Object.assign({ size: 'normal' }, props);
    const classes = (0, classnames_1.default)(props.className, props.align, {
        headline: true,
        '--bold': defaultedProps.bold || props.size === 'extra-large',
        '--line-through': defaultedProps.lineThrough,
        [`--${defaultedProps.size}`]: defaultedProps.size,
        'u-lh-1em': props.lineHeight === '1em',
    });
    const styles = {};
    if (props.color) {
        styles.color = props.color;
    }
    let Component = 'h4';
    if (defaultedProps.size === 'extra-large') {
        Component = 'h1';
    }
    else if (defaultedProps.size === 'larger') {
        Component = 'h2';
    }
    else if (defaultedProps.size === 'large') {
        Component = 'h3';
    }
    return (react_1.default.createElement(Component, { className: classes, style: styles }, props.children));
}
//# sourceMappingURL=Headline.js.map