import { trigger, style, transition, animate, query } from '@angular/animations';

export const fadeInAnimation = trigger('fadeIn', [
  transition(':leave', [
    query('.recommendations, @shrinkMainCard', style({ display: 'none' }), { optional: true }),
    style({ opacity: 1, height: '*' }),
    animate('.3s ease-in', style({ opacity: 0, height: '*' })),
  ]),
  transition(':enter', [style({ opacity: 0, height: '*' }), animate('.3s ease-out', style({ opacity: 1, height: '*' }))]),
]);
