(function (factory) {
    if (typeof module === "object" && typeof module.exports === "object") {
        var v = factory(require, exports);
        if (v !== undefined) module.exports = v;
    }
    else if (typeof define === "function" && define.amd) {
        define(["require", "exports", "tslib", "react", "./styles", "./helpers"], factory);
    }
})(function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var tslib_1 = require("tslib");
    var react_1 = (0, tslib_1.__importStar)(require("react"));
    var styles_1 = require("./styles");
    var helpers_1 = require("./helpers");
    var LabelComponent = function (_a) {
        var icon = _a.icon, isIcon = _a.isIcon, isDisabled = _a.isDisabled, status = _a.status, children = _a.children, isRequired = _a.isRequired, as = _a.as, size = _a.size, className = _a.className, props = (0, tslib_1.__rest)(_a, ["icon", "isIcon", "isDisabled", "status", "children", "isRequired", "as", "size", "className"]);
        var LabelIcon = (0, react_1.useMemo)(function () { return helpers_1.labelIcon[status]; }, [status]);
        return (react_1.default.createElement(styles_1.LabelStyled, (0, tslib_1.__assign)({ as: as, status: status, isDisabled: isDisabled, isRequired: isRequired, type: "cygnus", size: size, className: className }, props),
            isIcon && !icon && (react_1.default.createElement(LabelIcon, { className: "label-icon", width: 12, height: 12 })),
            icon && icon,
            children,
            isRequired && react_1.default.createElement("span", { className: "required-container" }, "*")));
    };
    exports.default = LabelComponent;
});
