import { VScreenAnimationType } from "../types.js";
const EFFECT_NONE = VScreenAnimationType.none;
const getFinalAttribute = (mark)=>mark?.finalAttribute ?? mark?.attribute ?? {};
const atmospherePoint = (effect)=>{
    if (effect === EFFECT_NONE) return {};
    if ('breath' === effect) return {
        channel: {
            scaleX: {
                from: 0.8,
                to: 2
            },
            scaleY: {
                from: 0.8,
                to: 2
            }
        }
    };
    if ('reveal' === effect) return {
        channel: {
            fillOpacity: {
                from: 0.6,
                to: 1
            },
            strokeOpacity: {
                from: 0.6,
                to: 1
            }
        }
    };
    return {
        channel: {
            outerBorder: {
                from: {
                    distance: 0,
                    strokeOpacity: 1
                },
                to: (...args)=>({
                        distance: 16,
                        strokeOpacity: 1e-8,
                        stroke: args[1]?.attribute?.fill
                    })
            }
        },
        custom: (ratio, from, to, out, graphic)=>{
            graphic.attribute.strokeOpacity = ratio * (to.strokeOpacity - from.strokeOpacity) + from.strokeOpacity;
            graphic.attribute.outerBorder = {
                distance: ratio * (to.outerBorder.distance - from.outerBorder.distance) + from.outerBorder.distance,
                strokeOpacity: ratio * (to.outerBorder.strokeOpacity - from.outerBorder.strokeOpacity) + from.outerBorder.strokeOpacity,
                stroke: to.outerBorder.stroke
            };
        }
    };
};
export { atmospherePoint, getFinalAttribute };

//# sourceMappingURL=pointAtmosphere.js.map