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) {
    return(// 加载器样式
    _define_property({}, "".concat(token.componentCls), {
        width: '20px',
        display: 'inline-flex',
        aspectRatio: 2,
        marginLeft: '8px',
        '--_g': 'no-repeat radial-gradient(circle closest-side, rgb(102, 111, 141) 90%, #0000)',
        background: [
            'var(--_g) 0% 50%',
            'var(--_g) 50% 50%',
            'var(--_g) 100% 50%'
        ].join(', '),
        backgroundSize: 'calc(100% / 3) 50%',
        animationName: 'l3',
        animationDuration: '1s',
        animationTimingFunction: 'linear',
        animationIterationCount: 'infinite'
    }));
};
/**
 * DotAni 样式 Hook
 * @param prefixCls 样式前缀
 * @returns 样式对象
 */ export function useDotAniStyle(prefixCls) {
    return useEditorStyleRegister('DotAni', function(token) {
        var dotAniToken = _object_spread_props(_object_spread({}, token), {
            componentCls: ".".concat(prefixCls)
        });
        return [
            genStyle(dotAniToken)
        ];
    });
}
