import { BaseAnimator } from './BaseAnimator.js';

export class FadeInSlideUpAnimator extends BaseAnimator {
  constructor(
    elements,
    delay,
    transitionDuration,
    translationStart = '0 20px'
  ) {
    super(elements, delay, transitionDuration, {
      setInitialProperties: (element) => {
        element.style.setProperty('opacity', 0);
        element.style.setProperty('translate', translationStart);
      },
      setAnimatedProperties: (element) => {
        element.style.setProperty('opacity', 1);
        element.style.setProperty('translate', '0 0');
      }
    });

    this.translationStart = translationStart;
    this.translationEnd = '0 0';
  }
}
