import { Injectable } from "@angular/core";
import { Subject } from "rxjs/Subject";



export interface ICoreDialogArguments
{
    className:string;
    path:string;
    backgroundColor?:string;
    hasBackButton?:boolean;
    tittle?:string;
}

/**
 * Created by jd on 04/05/2016.
 */

@Injectable()
export class CoreDialogService
{
    public onShow = new Subject<ICoreDialogArguments>();
    public onBack = new Subject<boolean>();

    constructor()
    {

    }
    public show = (newDialog:ICoreDialogArguments ) =>
    {
        this.onShow.next(newDialog);
    };


    public back = ():void => this.onBack.next(true);


}