import { OriginalElementWidthEvents } from "../../Dream";

export const DreamSvgaAni: OriginalElementWidthEvents<{
  svgaData: any,
  loop?: number,
  loopEnd?: () => void
}, FYGE.SvgaAni> = ({
  svgaData,
  loop = 0,
  loopEnd = () => {}
}) => {
  const svgaIns = new FYGE.SvgaAni(svgaData)
  svgaIns.play(loop, loopEnd)
  return svgaIns
}