/**
 * Created by jd on 07/07/2016.
 */

import {
    trigger,
    state,
    style,
    transition,
    animate,
    AnimationEntryMetadata
} from "@angular/core";

export class CoreAnimations
{
    public static animationReveal = (): AnimationEntryMetadata =>
    {
        return trigger('animationReveal', [
            state('inactive', style({transform: 'scale(0)'})),
            state('active', style({transform: 'scale(1)'})),
            transition('inactive <=> active', [animate("300ms cubic-bezier(.55,0,.1,1)")])
        ])
    };

    public static animationSideSlide = (): AnimationEntryMetadata =>
    {
        return trigger('animationSideSlide', [
            state('inactive', style({transform: 'translateX(-100%)'})),
            state('active', style({transform: 'translateX(0)'})),
            transition('inactive <=> active', [animate("400ms cubic-bezier(.55,0,.1,1)")])
        ])
    };
}