"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ErrorMessage = void 0;
var react_1 = __importDefault(require("react"));
var classnames_1 = __importDefault(require("classnames"));
var Typography_1 = __importDefault(require("@mui/material/Typography"));
var styles_1 = require("./styles");
var ErrorMessage = function (_a) {
    var className = _a.className, message = _a.message;
    var styles = (0, styles_1.useStyles)();
    if (!message) {
        return null;
    }
    return (react_1.default.createElement(Typography_1.default, { "data-reltio-id": "error-message", variant: "caption", className: (0, classnames_1.default)(styles.caption, className) }, message));
};
exports.ErrorMessage = ErrorMessage;
