import { Http } from '@angular/http';
import { MatDialogRef, MatSnackBar } from '@angular/material';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
import { IInteractiveVersion, IInteractiveVersionWithGame } from '../redux/sync';
import { MemorizingSubject } from '../util/memorizingSubject';
export declare enum State {
    LoggingIn = 0,
    Loading = 1,
    Selecting = 2,
}
/**
 * Partial typings for an InteractiveProject resource on Mixer.
 * {@see https://dev.mixer.com/rest.html#InteractiveGame}
 */
export interface IGameWithNestedVersions {
    name: string;
    versions: IInteractiveVersion[];
}
/**
 * The Launch Dialog prompts the user to log in, and connect to Interactive
 * for them. It calls back with connection details, or undefined if the dialog
 * was dismissed beforehand.
 */
export declare class LinkDialogComponent {
    private readonly http;
    private readonly dialogRef;
    private readonly snackRef;
    /**
     * Exposed State enum for the template to consume.
     */
    State: typeof State;
    /**
     * Curre state of the component.
     */
    state: BehaviorSubject<State>;
    /**
     * List of interactive projects the user owns.
     */
    projects: MemorizingSubject<IGameWithNestedVersions[]>;
    /**
     * Currently expanded project, listing its owned versions.
     */
    expandedProject: BehaviorSubject<number>;
    constructor(http: Http, dialogRef: MatDialogRef<IInteractiveVersionWithGame>, snackRef: MatSnackBar);
    onLoggedIn(): void;
    /**
     * getLastUpdatedAgo returns the "time ago" of the last updated version
     * of the game.
     */
    getLastUpdatedAgo(game: IGameWithNestedVersions): string;
    /**
     * Returns the "time ago" of the given date / timestamp.
     */
    getTimeAgo(date: string | number): string;
    /**
     * getLastUpdatedDate returns the most recent updatedAt of a version of
     * the Interactive game, returning 0 if there are no attached versions.
     */
    getLastUpdatedDate(game: IGameWithNestedVersions): number;
    /**
     * Chooses the version to link, and closes the dialog.
     */
    select(interactiveVersion: IInteractiveVersion, game: IGameWithNestedVersions): void;
    /**
     * Attempts to create a connection to Interactive. Closes the dialog
     * when it successfully does so.
     */
    private loadProjects();
}
