import { EFFECT_NONE, allowAnimation, atmospherePoint, getPrimaryEffect, toMs } from "./utils/index.js";
const radarAppear = (config)=>{
    if (!allowAnimation(config)) return false;
    const effect = getPrimaryEffect(config);
    return {
        preset: 'radial' === effect ? 'clipIn' : 'grow',
        duration: toMs(config?.duration),
        easing: config?.ease
    };
};
const radarLoop = (config, ignoreFirstNormal)=>{
    if (!config?.enable) return false;
    const interval = config.interval ?? 0;
    const startTime = ignoreFirstNormal ? toMs(interval) : 0;
    if ((config.atmosphere?.effect ?? EFFECT_NONE) === EFFECT_NONE) return false;
    return {
        point: {
            loop: true,
            startTime,
            delayAfter: toMs(interval),
            duration: 1000,
            easing: config.atmosphere?.ease,
            ...atmospherePoint(config.atmosphere?.effect),
            controlOptions: {
                immediatelyApply: false
            }
        }
    };
};
const radarUpdate = (config)=>{
    if (!allowAnimation(config)) return false;
    return {
        duration: toMs(config?.duration),
        easing: config?.ease
    };
};
const radarExit = (config)=>{
    if (!allowAnimation(config)) return false;
    return {
        duration: toMs(config?.duration),
        easing: config?.ease
    };
};
export { radarAppear, radarExit, radarLoop, radarUpdate };

//# sourceMappingURL=radar.js.map