/**
 * Copyright (c) Haiku 2016-2018. All rights reserved.
 */
import { Curve } from './api/Curve';
import { BytecodeOptions, HaikuBytecode } from './api/HaikuBytecode';
import HaikuClock from './HaikuClock';
import HaikuContext from './HaikuContext';
import HaikuElement from './HaikuElement';
import HaikuTimeline from './HaikuTimeline';
import { RFO } from './reflection/functionToRFO';
import StateTransitionManager, { StateTransitionParameters, StateValues } from './StateTransitionManager';
/**
 * An interface for a "hot component" to patch into the renderer.
 *
 * Hot components are intended to be applied during hot editing when an immutable-looking thing happens to mutate
 * without marking the owner HaikuComponent instance for a full flush render.
 */
export interface HotComponent {
    timelineName: string;
    selector: string;
    propertyNames: string[];
}
export interface ClearCacheOptions {
    clearStates?: boolean;
}
export default class HaikuComponent extends HaikuElement {
    builder: any;
    _flatManaTree: any;
    _horizonElements: any;
    isDeactivated: any;
    isSleeping: any;
    _matchedElementCache: any;
    _mutableTimelines: any;
    _states: any;
    bytecode: any;
    /**
     * @deprecated
     */
    _bytecode: any;
    config: any;
    container: any;
    context: HaikuContext;
    CORE_VERSION: any;
    doAlwaysFlush: any;
    doesNeedFullFlush: any;
    guests: any;
    host: any;
    playback: any;
    PLAYER_VERSION: any;
    registeredEventHandlers: any;
    state: any;
    stateTransitionManager: StateTransitionManager;
    constructor(bytecode: HaikuBytecode, context: HaikuContext, host: HaikuComponent, config: BytecodeOptions, container: any);
    /**
     * @description Track elements that are at the horizon of what we want to render, i.e., a list of
     * virtual elements that we don't want to make any updates lower than in the tree.
     */
    markHorizonElement(virtualElement: any): void;
    isHorizonElement(virtualElement: any): boolean;
    registerGuest(subcomponent: HaikuComponent): void;
    visitGuestHierarchy(visitor: Function): void;
    callRemount(incomingConfig: any, skipMarkForFullFlush: any): void;
    destroy(): void;
    callUnmount(): void;
    assignConfig(incomingConfig: any): this;
    set(key: any, value: any): this;
    get(key: any): any;
    setState(states: StateValues, transitionParameter?: StateTransitionParameters): this;
    getStates(): any;
    clearCaches(options?: ClearCacheOptions): void;
    getClock(): HaikuClock;
    getTemplate(): any;
    getTimelines(): any;
    fetchTimelines(): {};
    getTimeline(name: any): HaikuTimeline;
    fetchTimeline(name: any, descriptor: any): HaikuTimeline;
    getDefaultTimeline(): HaikuTimeline;
    stopAllTimelines(): void;
    startAllTimelines(): void;
    startTimeline(timelineName: any): void;
    stopTimeline(timelineName: any): void;
    getTimelineDescriptor(timelineName: any): any;
    getInjectables(element?: any): any;
    /**
     * @method _deactivate
     * @description When hot-reloading a component during editing, this can be used to
     * ensure that this component doesn't keep updating after its replacement is loaded.
     */
    deactivate(): void;
    activate(): void;
    sleepOn(): void;
    sleepOff(): void;
    /**
     * @method dump
     * @description Dump serializable info about this object
     */
    dump(): string;
    getBytecodeMetadata(): any;
    getBytecodeRelpath(): string;
    getBytecodeProject(): string;
    getBytecodeOrganization(): string;
    getAddressableProperties(out?: {}): {};
    bindStates(): void;
    defineSettableState(stateSpec: any, stateSpecName: string): void;
    allEventHandlers(): any;
    eachEventHandler(iteratee: Function): void;
    routeEventToHandler(eventSelectorGiven: string, eventNameGiven: string, eventArgs: any): void;
    callEventHandler(eventsSelector: string, eventName: string, handler: Function, eventArgs: any): any;
    routeEventToHandlerAndEmit(eventSelectorGiven: string, eventNameGiven: string, eventArgs: any): void;
    markForFullFlush(): this;
    unmarkForFullFlush(): this;
    shouldPerformFullFlush(): any;
    performFullFlushRenderWithRenderer(renderer: any, options?: any): any;
    render(options?: any): any;
    performPatchRenderWithRenderer(renderer: any, options: any, skipCache: boolean): void;
    patch(options?: {}, skipCache?: boolean): {};
    applyContextChanges(template: any, options?: any): void;
    gatherDeltaPatches(template: any, options?: any, skipCache?: boolean): {};
    applyBehaviors(deltas: any, options: any, isPatchOperation: any, skipCache?: boolean): void;
    applyPropertyToNode(node: any, name: string, value: any, timeline: HaikuTimeline): void;
    findElementsByHaikuId(componentId: any): any;
    _hydrateMutableTimelines(): void;
    addHotComponent(hotComponent: HotComponent): void;
    controlTime(timelineName: string, timelineTime: number): void;
    getControlledTimeDefinedForGuestComponent(guest: HaikuComponent, timelineName: string, timelineTime: number): number;
    getPropertiesGroup(timelineName: string, flexId: string): any;
    getOutputValue(timelineName: string, timelineTime: number, flexId: string, propertyName: string): any;
    /**
     * Execute state transitions.
     */
    tickStateTransitions(): void;
    /**
     * Reset states to initial values by using State Transitions. Default to linear
     */
    resetStatesToInitialValuesWithTransition(duration: number, curve?: Curve): void;
    static __name__: string;
    static PLAYER_VERSION: any;
    static CORE_VERSION: any;
    static all: () => HaikuComponent[];
}
export interface ClonedFunction {
    (...args: any[]): void;
    __rfo?: RFO;
}
