import { ActionReducer, Store } from '@ngrx/store';
import { IStateDump } from '@mcph/miix-std/dist/internal';
import { IFilter } from '../console/console.service';
import * as Code from './code';
import * as Connect from './connect';
import * as Console from './console';
import * as Frame from './frame';
import * as Sync from './sync';
/**
 * IProject is the application state for the project.
 */
export interface IProject {
    frame: Frame.IFrameState;
    code: Code.ICodeState;
    connect: Connect.IConnectState;
    sync: Sync.ISyncState;
    console: Console.IConsoleState;
}
export declare enum MetaActions {
    ReplaceState = "META_REPLACE_STATE",
}
/**
 * ProjectService provides notation on the IProject state.
 */
export declare class ProjectService {
    private store;
    constructor(store: Store<IProject>);
    /**
     * Applies a direct partial update to the state.
     */
    replaceState(data: Partial<IProject>, omitSave?: boolean): void;
    /**
     * Change whether the controls are ready.
     */
    setControlsReady(isReady: boolean): void;
    /**
     * Change the selected device.
     */
    chooseDevice(deviceIndex: number): void;
    /**
     * Rotate the device.
     */
    rotateDevice(): void;
    /**
     * Manually override the device dimensions, called by the user.
     */
    resizeDevice(width?: number, height?: number): void;
    /**
     * Sets the displayed dimensions of the device. Called automatically when
     * the device is changed or the window is resized.
     */
    setDeviceDisplayedSize(width: number, height: number): void;
    /**
     * Sets whether the frame is masked (covered by a transparent overlay).
     * Useful when dragging thing.
     */
    setFrameMasked(isMasked: boolean): void;
    /**
     * Updates the controls tab/state.
     */
    setCodeState(state: Code.CodeState): void;
    /**
     * Updates the width of the code block, in pixels.
     */
    setCodeWidth(width: number): void;
    /**
     * Updates the active controls state.
     */
    connectControls(data: Connect.IInteractiveJoin): void;
    /**
     * Disconnects the active interactive controls.
     */
    disconnectControls(): void;
    /**
     * Updates the connected state.
     */
    setControlsState(controlsState: IStateDump): void;
    /**
     * Updates the channel the controls will connect to..
     */
    setConnectionChannel(channelID: number): void;
    syncUnlink(): void;
    syncLink(interactiveVersion: Sync.IInteractiveVersionWithGame): void;
    syncDontConfirmSchema(): void;
    setConsoleFilter(filter: IFilter): void;
}
/**
 * localStorageReduxer is a metareducer that saves changes to localstorage.
 */
export declare function setInitialState(reducer: ActionReducer<IProject, any>): ActionReducer<IProject, any>;
/**
 * localStorageReduxer is a metareducer that saves changes to localstorage.
 */
export declare function replaceStateReducer(reducer: ActionReducer<IProject, any>): ActionReducer<IProject, any>;
/**
 * ngrx store reducers.
 */
export declare const reducers: {
    [key in keyof IProject]: Function;
};
/**
 * ngrx metareducers
 */
export declare const metaReducers: ((reducer: ActionReducer<IProject, any>) => ActionReducer<IProject, any>)[];
/**
 * Returns the partial part of the project which should be saved.
 */
export declare function getStoredData(project: IProject): Partial<IProject>;
