import type { Config } from '@lottiefiles/dotlottie-web';

import { ClassComponent } from '../ts-helpers';

export interface AnimationDefaultConfig {
  libPath: 'supplyasset' | 'workspace' | 'admin';
}

export interface AnimationProps {
  animation: 'loading-table-fa' | 'no-data-fa';
  /**
   * @default true
   */
  autoplay?: boolean;
  /**
   * @default true
   */
  loop?: boolean;
  /**
   * Custom configurations for the animation
   * Reference: https://developers.lottiefiles.com/docs/dotlottie-player/dotlottie-web/api/config/
   */
  customConfig?: Partial<Config>;
  canvasStyle?: string;
}

/**
 * **Animation**
 *
 * _Animation is a lottie animation wrapper._
 *
 * @group Component
 */
declare class Animation extends ClassComponent<
  AnimationProps,
  unknown,
  unknown
> {}

export default Animation;
