import { prefab } from '@diez/engine' ; import { File } from './file' ; /**
 * Lottie data.
 */ export interface LottieData { file : File ; loop : boolean ; autoplay : boolean ; } noinheritdoc export class Lottie extends prefab < LottieData > ( ) { defaults = { file : new File ( ) , loop : true , autoplay : true , } ; /**
     * Creates a Lottie component from a source file, e.g.
     *
     * `const lottie = Lottie.fromJson('assets/lottie-files/animation.json', true, true);`
     */ static fromJson ( src , loop ? , autoplay ? ) { return new Lottie ( { loop , autoplay , file : new File ( { src } ) , } ) ; } }