import { z } from "zod";
const createEffectConfig = (effects)=>z.object({
        enable: z.boolean().optional(),
        effects: z.array(z["enum"](effects)).optional(),
        ease: z.string().optional(),
        duration: z.number().optional(),
        color: z.string().optional()
    });
const zLoopBase = {
    enable: z.boolean().optional(),
    interval: z.number().optional()
};
const zPointAtmosphere = z.object({
    ease: z.string().optional(),
    color: z.string().optional(),
    effect: z["enum"]([
        'ripple',
        'reveal',
        'breath'
    ]).optional()
});
const zNoEffectAtmosphere = z.object({
    ease: z.string().optional(),
    color: z.string().optional()
});
const createAnimation = (config)=>z.object({
        enable: z.boolean().optional(),
        params: z.object({
            appear: createEffectConfig(config.appear).optional(),
            update: createEffectConfig(config.update).optional(),
            loop: z.object({
                ...zLoopBase,
                ...config.loop ? {
                    loop: createEffectConfig(config.loop).optional()
                } : {},
                ...config.atmosphere ? {
                    atmosphere: config.atmosphere.optional()
                } : {}
            }).optional()
        }).optional()
    });
const zBarLikeAnimation = createAnimation({
    appear: [
        'growth'
    ],
    update: [
        'growth',
        'moveIn'
    ],
    loop: [
        'highLight',
        'growth',
        'moveIn',
        'none'
    ],
    atmosphere: zPointAtmosphere
});
const zLineAreaAnimation = createAnimation({
    appear: [
        'load',
        'growth'
    ],
    update: [
        'growth'
    ],
    loop: [
        'load',
        'growth',
        'none'
    ],
    atmosphere: zPointAtmosphere
});
const zScatterAnimation = createAnimation({
    appear: [
        'growth',
        'scale'
    ],
    update: [
        'growth'
    ],
    loop: [
        'growth',
        'scale',
        'none'
    ],
    atmosphere: zPointAtmosphere
});
const zPieLikeAnimation = createAnimation({
    appear: [
        'radial',
        'scale'
    ],
    update: [
        'radial'
    ],
    loop: [
        'enlarge',
        'relocate'
    ],
    atmosphere: zNoEffectAtmosphere
});
const zRadarAnimation = createAnimation({
    appear: [
        'radial',
        'scale'
    ],
    update: [
        'growth'
    ],
    atmosphere: zPointAtmosphere
});
export { zBarLikeAnimation, zLineAreaAnimation, zPieLikeAnimation, zRadarAnimation, zScatterAnimation };

//# sourceMappingURL=zAnimation.js.map