'use strict';

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

var styles = {"statusLabelRow":"OADGAhZt8dY-","success":"gQdAtJ0BiSk-","warning":"_1vqcSM0FTig-","critical":"maK19lcw4T8-","inactive":"n-xRjfGbWgM-","informative":"d6Y1CRe9qac-","labelTextEndAligned":"PqXUSR-3s4M-","statusIndicatorWrapper":"RmE4LVHqe60-","spinning":"EJ48QL3omXo-"};

function StatusLabel({ label, alignment = "start", status = "inactive", }) {
    const containerClassNames = classnames(styles.statusLabelRow, styles[status], alignment === "end" && styles.labelTextEndAligned);
    return (React.createElement("div", { role: "status", className: containerClassNames },
        React.createElement("div", { className: styles.statusIndicatorWrapper },
            React.createElement(StatusIndicator.StatusIndicator, { status: status })),
        React.createElement(Typography.Typography, { size: "small", align: alignment }, label)));
}

exports.StatusLabel = StatusLabel;
