import { __assign, __rest } from "tslib";
import React, { useMemo } from "react";
import { LabelStyled } from "./styles";
import { labelIcon } from "./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 = __rest(_a, ["icon", "isIcon", "isDisabled", "status", "children", "isRequired", "as", "size", "className"]);
    var LabelIcon = useMemo(function () { return labelIcon[status]; }, [status]);
    return (React.createElement(LabelStyled, __assign({ as: as, status: status, isDisabled: isDisabled, isRequired: isRequired, type: "cygnus", size: size, className: className }, props),
        isIcon && !icon && (React.createElement(LabelIcon, { className: "label-icon", width: 12, height: 12 })),
        icon && icon,
        children,
        isRequired && React.createElement("span", { className: "required-container" }, "*")));
};
export default LabelComponent;
