function _define_property(obj, key, value) {
    if (key in obj) {
        Object.defineProperty(obj, key, {
            value: value,
            enumerable: true,
            configurable: true,
            writable: true
        });
    } else {
        obj[key] = value;
    }
    return obj;
}
function _object_spread(target) {
    for(var i = 1; i < arguments.length; i++){
        var source = arguments[i] != null ? arguments[i] : {};
        var ownKeys = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
            ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
                return Object.getOwnPropertyDescriptor(source, sym).enumerable;
            }));
        }
        ownKeys.forEach(function(key) {
            _define_property(target, key, source[key]);
        });
    }
    return target;
}
function ownKeys(object, enumerableOnly) {
    var keys = Object.keys(object);
    if (Object.getOwnPropertySymbols) {
        var symbols = Object.getOwnPropertySymbols(object);
        if (enumerableOnly) {
            symbols = symbols.filter(function(sym) {
                return Object.getOwnPropertyDescriptor(object, sym).enumerable;
            });
        }
        keys.push.apply(keys, symbols);
    }
    return keys;
}
function _object_spread_props(target, source) {
    source = source != null ? source : {};
    if (Object.getOwnPropertyDescriptors) {
        Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
    } else {
        ownKeys(Object(source)).forEach(function(key) {
            Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
        });
    }
    return target;
}
import { useEditorStyleRegister } from "../Hooks/useStyle";
var genStyle = function(token) {
    var _obj, _obj1;
    return _obj1 = {}, _define_property(_obj1, token.componentCls, {
        display: 'inline-flex',
        flexDirection: 'column',
        padding: '3px 4px 3px 8px',
        color: 'var(--color-gray-text-default)',
        background: 'var(--color-gray-bg-card-white)',
        borderRadius: 'var(--radius-control-base)',
        boxShadow: 'var(--shadow-control-base)',
        '&-content': {
            display: 'flex',
            alignItems: 'center'
        },
        '&-icon': {
            width: 14,
            height: 14,
            fontSize: 14
        },
        '&-message': {
            flex: 1,
            paddingLeft: 8,
            paddingRight: 8,
            font: 'var(--font-text-body-emphasized-base)',
            letterSpacing: 'var(--letter-spacing-body-emphasized-base, normal)'
        },
        '&-description': {
            font: 'var(--font-text-paragraph-base)',
            letterSpacing: 'var(--letter-spacing-paragraph-base, normal)'
        },
        '&-close-icon': {
            display: 'flex',
            alignItems: 'center',
            justifyContent: 'center',
            width: 20,
            height: 20,
            padding: 0,
            backgroundColor: 'transparent',
            color: 'var(--color-gray-text-disabled)',
            borderRadius: 'var(--radius-control-sm)',
            fontSize: 14,
            border: 'none',
            outline: 'none',
            cursor: 'pointer',
            transition: 'all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)',
            '&:hover': {
                backgroundColor: 'var(--color-gray-control-fill-active)'
            }
        }
    }), _define_property(_obj1, "".concat(token.componentCls, "-with-description"), (_obj = {
        display: 'flex',
        padding: '12px',
        borderRadius: 'var(--radius-card-base)'
    }, _define_property(_obj, "".concat(token.componentCls, "-content"), {
        marginBottom: 8
    }), _define_property(_obj, "".concat(token.componentCls, "-icon"), {
        width: 18,
        height: 18,
        fontSize: 18
    }), _define_property(_obj, "".concat(token.componentCls, "-message"), {
        font: 'var(--font-text-h5-base)',
        letterSpacing: 'var(--letter-spacing-h5-base, normal)'
    }), _obj)), // ================== Types ==================
    _define_property(_obj1, "".concat(token.componentCls, "-success"), _define_property({
        color: 'var(--color-green-text-secondary)',
        backgroundColor: 'var(--color-green-bg-tip)',
        boxShadow: 'none'
    }, "".concat(token.componentCls, "-close-icon"), {
        color: 'rgba(0, 176, 102, 0.81)',
        '&:hover': {
            backgroundColor: 'var(--color-green-control-fill-active)'
        }
    })), _define_property(_obj1, "".concat(token.componentCls, "-warning"), _define_property({
        color: 'var(--color-yellow-text-secondary)',
        backgroundColor: 'var(--color-yellow-bg-tip)',
        boxShadow: 'none'
    }, "".concat(token.componentCls, "-close-icon"), {
        color: 'rgba(235, 159, 0, 1)',
        '&:hover': {
            backgroundColor: 'var(--color-yellow-control-fill-active)'
        }
    })), _define_property(_obj1, "".concat(token.componentCls, "-error"), _define_property({
        color: 'var(--color-red-text-secondary)',
        backgroundColor: 'var(--color-red-bg-tip)',
        boxShadow: 'none'
    }, "".concat(token.componentCls, "-close-icon"), {
        color: 'rgba(212, 23, 1, 0.48)',
        '&:hover': {
            backgroundColor: 'var(--color-red-control-fill-active)'
        }
    })), _define_property(_obj1, "".concat(token.componentCls, "-info"), _define_property({
        color: 'var(--color-blue-text-secondary)',
        backgroundColor: 'var(--color-blue-bg-tip)',
        boxShadow: 'none'
    }, "".concat(token.componentCls, "-close-icon"), {
        color: 'rgba(0, 101, 250, 0.55)',
        '&:hover': {
            backgroundColor: 'var(--color-blue-control-fill-active)'
        }
    })), _define_property(_obj1, "".concat(token.componentCls, "-gray"), _define_property({
        color: 'var(--color-gray-text-secondary)',
        backgroundColor: 'var(--color-gray-bg-tip)',
        boxShadow: 'none'
    }, "".concat(token.componentCls, "-close-icon"), {
        color: 'rgba(80, 94, 119, 0.32)',
        '&:hover': {
            backgroundColor: 'var(--color-gray-control-fill-active)'
        }
    })), _obj1;
};
export function useStyle(prefixCls) {
    return useEditorStyleRegister('answer-alert', function(token) {
        var answerAlertToken = _object_spread_props(_object_spread({}, token), {
            componentCls: ".".concat(prefixCls)
        });
        return [
            genStyle(answerAlertToken)
        ];
    });
}
