import { jsx as _jsx } from "react/jsx-runtime";
import { useStyleConfig, vui } from '../core';
import { Icon } from '../icon';
import { cs } from '../utils';
import { dialogStatusMapping } from './consts';
import { useDialogContext } from './context';
/** Shows an icon based on a given status. Optionally, can be a custom icon. */
export const DialogIcon = vui((props, ref) => {
    const { className, ...rest } = props;
    const { status = '' } = useDialogContext() ?? {};
    const styles = useStyleConfig('Dialog', useDialogContext());
    const { iconProps } = dialogStatusMapping[status] ?? {};
    return _jsx(Icon, { className: cs('vui-dialogIcon', className), mr: 2, ref: ref, ...styles.icon, ...iconProps, ...rest });
});
DialogIcon.displayName = 'DialogIcon';
export default DialogIcon;
//# sourceMappingURL=dialogIcon.js.map