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 { Keyframes } from "@ant-design/cssinjs";
import { useEditorStyleRegister } from "../../Hooks/useStyle";
var beforeAnimation = new Keyframes('beforeAnimation', {
    '0%, 100%': {
        transform: 'translate(0, 0)'
    },
    '25%': {
        transform: 'translate(20%, 10%)'
    },
    '50%': {
        transform: 'translate(30%, 20%)'
    },
    '75%': {
        transform: 'translate(15%, 15%)'
    }
});
var afterAnimation = new Keyframes('afterAnimation', {
    '0%, 100%': {
        transform: 'translate(0, 0)'
    },
    '25%': {
        transform: 'translate(-20%, 10%)'
    },
    '50%': {
        transform: 'translate(-30%, -15%)'
    },
    '75%': {
        transform: 'translate(-15%, -10%)'
    }
});
var genStyle = function(token) {
    var _obj, _obj1;
    return _obj1 = {}, _define_property(_obj1, token.componentCls, (_obj = {
        position: 'relative',
        display: 'inline-flex',
        alignItems: 'center',
        gap: 4,
        textAlign: 'center',
        verticalAlign: 'middle'
    }, _define_property(_obj, "".concat(token.componentCls, "-with-tip"), {
        alignItems: 'center'
    }), _define_property(_obj, "".concat(token.componentCls, "-with-children"), {
        alignItems: 'center'
    }), _define_property(_obj, "".concat(token.componentCls, "-tip"), {
        color: 'var(--color-gray-text-secondary)',
        font: 'var(--font-text-body-emphasized-base)',
        letterSpacing: 'var(--letter-spacing-body-emphasized-base, normal)'
    }), _obj)), _define_property(_obj1, "".concat(token.componentCls, "-nested-pattern"), _define_property({
        position: 'relative'
    }, "&".concat(token.componentCls, "-spinning"), _define_property({
        background: 'var(--color-primary-bg-page, #f5f9ff)',
        borderRadius: 'var(--radius-card-lg, 22px)',
        overflow: 'hidden',
        '&:before, &:after': {
            content: "''",
            position: 'absolute',
            borderRadius: '50%',
            willChange: 'transform',
            pointerEvents: 'none'
        },
        '&::before': {
            width: '120%',
            height: '160%',
            top: '-30%',
            left: '-40%',
            background: 'radial-gradient(ellipse 70% 60% at 50% 50%, var(--color-sub2-2, #f0fbfe) 0%, transparent 70%)',
            animationName: beforeAnimation,
            animationDuration: '6s',
            animationTimingFunction: 'ease-in-out',
            animationIterationCount: 'infinite'
        },
        '&::after': {
            width: '100%',
            height: '140%',
            top: '-30%',
            right: '-40%',
            background: 'radial-gradient(ellipse 70% 60% at 50% 50%, var(--color-sub1-2, #f1f0ff) 0%, transparent 60%)',
            filter: 'blur(60px)',
            animationName: afterAnimation,
            animationDuration: '7s',
            animationTimingFunction: 'ease-in-out',
            animationIterationCount: 'infinite'
        }
    }, "& > ".concat(token.componentCls), {
        position: 'absolute',
        top: 0,
        left: 0,
        zIndex: 4,
        display: 'flex',
        flexDirection: 'column',
        alignItems: 'center',
        justifyContent: 'center',
        gap: 4,
        width: '100%',
        height: '100%'
    }))), _obj1;
};
export var prefixCls = 'loading';
export function useStyle(prefixCls) {
    return useEditorStyleRegister('loading', function(token) {
        var badgeToken = _object_spread_props(_object_spread({}, token), {
            componentCls: ".".concat(prefixCls)
        });
        return [
            genStyle(badgeToken)
        ];
    });
}
