import React from 'react';
import { StatusAlertFilledSmall, StatusWarningFilledSmall, } from '@wix/wix-ui-icons-common';
import Text from '../../../Text';
import { dataHooks } from '../../constants';
import { st, classes } from './StatusMessage.st.css.js';
const StatusIcon = ({ status }) => {
    const iconByStatus = {
        error: StatusAlertFilledSmall,
        warning: StatusWarningFilledSmall,
    };
    const Icon = iconByStatus[status];
    return (React.createElement("div", { className: classes.statusIcon },
        React.createElement(Icon, null)));
};
const StatusMessage = ({ statusMessage, status, labelSize, labelPlacement, statusId, }) => (React.createElement("div", { className: st(classes.root, {
        status,
        labelSize,
        labelPlacement,
    }) },
    status && React.createElement(StatusIcon, { status: status }),
    React.createElement(Text, { id: statusId, dataHook: dataHooks.statusMessage, skin: status === 'error' ? 'error' : 'standard', secondary: status !== 'error', size: labelSize }, statusMessage)));
export default StatusMessage;
//# sourceMappingURL=StatusMessage.js.map