"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Message = exports.ErrorIcon = exports.SuccessIcon = exports.Wrapper = void 0;
const ErrorFillSm_1 = require("../../../icons/ErrorFillSm");
const SuccessFillSm_1 = require("../../../icons/SuccessFillSm");
const styled_1 = require("../../styled");
const getStyles = (theme) => {
    return `display: inline-flex;
  justify-content: center;
  font-size: ${theme.typography.h5.fontSize};
  vertical-align: middle;`;
};
// flex необходим, для того, чтобы span не менял высоту полей и имел фиксированную высоту в 16px
exports.Wrapper = styled_1.styled.span `
  display: flex;

  color: ${({ success, error, theme }) => {
    if (success) {
        return theme.palette.success.dark;
    }
    if (error) {
        return theme.palette.error.dark;
    }
    return 'inherit';
}};
`;
exports.SuccessIcon = (0, styled_1.styled)(SuccessFillSm_1.SuccessFillSm) `
  ${({ theme }) => getStyles(theme)}
`;
exports.ErrorIcon = (0, styled_1.styled)(ErrorFillSm_1.ErrorFillSm) `
  ${({ theme }) => getStyles(theme)}
`;
exports.Message = styled_1.styled.span `
  vertical-align: middle;
`;
