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;
}
import Lottie from "lottie-react";
import React from "react";
import creativeSpark from "./creativeSpark.json";
/**
 * 创意生成中火花组件
 *
 * 使用 Lottie 动画展示创意生成中火花的组件，支持自定义尺寸、样式和播放行为。
 *
 * @component
 * @example
 * // 基础用法
 * <CreativeSparkLottie />
 *
 * @example
 * // 自定义尺寸
 * <CreativeSparkLottie size={64} />
 *
 * @example
 * // 自定义样式
 * <CreativeSparkLottie
 *   size={80}
 *   style={{ margin: '20px' }}
 *   className="custom-creative-spark"
 * />
 *
 * @example
 * // 控制播放行为
 * <CreativeSparkLottie
 *   autoplay={false}
 *   loop={false}
 * />
 *
 * @param props - 组件属性
 * @param props.autoplay - 是否自动播放动画，默认为 true
 * @param props.loop - 是否循环播放动画，默认为 true
 * @param props.className - 动画容器类名
 * @param props.style - 动画容器自定义样式
 * @param props.size - 动画尺寸（宽度和高度）
 * @returns 渲染的创意生成中火花组件
 */ export var CreativeSparkLottie = function CreativeSparkLottie(param) {
    var _param_autoplay = param.autoplay, autoplay = _param_autoplay === void 0 ? true : _param_autoplay, _param_loop = param.loop, loop = _param_loop === void 0 ? true : _param_loop, className = param.className, style = param.style, size = param.size;
    var containerStyle = _object_spread({
        width: size,
        height: size,
        display: 'flex',
        justifyContent: 'center',
        alignItems: 'center'
    }, style);
    return /*#__PURE__*/ React.createElement(Lottie, {
        style: containerStyle,
        className: className,
        "data-testid": "lottie-animation",
        "aria-hidden": "true",
        animationData: creativeSpark,
        loop: loop,
        autoplay: autoplay
    });
};
export default CreativeSparkLottie;
