import{o as e}from"./rolldown-runtime-iuO8RvI4.js";import{t}from"./preload-helper-DxVatP6Z.js";import{Mi as a,ki as r}from"./vendor-frame-CwiylG4Y.js";var o=e(a()),s=r();function n({path:e,animationData:a,loop:r=!1,speed:n=1,className:i,style:l}){const[m,p]=(0,o.useState)(null);return(0,o.useEffect)(()=>{if(!m)return;let o,s=!1;return t(()=>import("./cf27cae7f-Co3qXx__.js").then(t=>{s||(o=t.default.loadAnimation({container:m,renderer:"svg",loop:r,autoplay:!0,...a?{animationData:structuredClone(a)}:{path:e}}),1!==n&&o.setSpeed(n))},()=>{}),[]),()=>{s=!0,o?.destroy()}},[m,e,a,r,n]),(0,s.jsx)("div",{ref:p,className:i,style:l})}export{n as LottieAnimation};