import { Editing, Func, Procedure, Terminable, TerminableOwner, Terminator, UUID } from "@opendaw/lib-std";
import { BoxGraph } from "@opendaw/lib-box";
import { AudioBusBox, AudioUnitBox, BoxIO, RootBox, TimelineBox, UserInterfaceBox } from "@opendaw/studio-boxes";
import { AnyRegionBoxAdapter, AudioUnitBoxAdapter, BoxAdapters, BoxAdaptersContext, ClipSequencing, DeviceBoxAdapter, FilteredSelection, ParameterFieldAdapters, ProcessorOptions, ProjectSkeleton, RootBoxAdapter, SampleLoaderManager, SoundfontLoaderManager, TimelineBoxAdapter, UserEditingManager, VertexSelection } from "@opendaw/studio-adapters";
import { LiveStreamBroadcaster, LiveStreamReceiver } from "@opendaw/lib-fusion";
import { ProjectEnv } from "./ProjectEnv";
import { Mixer } from "../Mixer";
import { ProjectApi } from "./ProjectApi";
import { CaptureDevices } from "../capture";
import { EngineFacade } from "../EngineFacade";
import { EngineWorklet } from "../EngineWorklet";
import { MIDILearning } from "../midi";
import { ppqn, TempoMap } from "@opendaw/lib-dsp";
import { RegionOverlapResolver, TimelineFocus } from "../ui";
import { AudioUnitFreeze } from "../AudioUnitFreeze";
export type RestartWorklet = {
    unload: Func<unknown, Promise<unknown>>;
    load: Procedure<EngineWorklet>;
};
export type ProjectCreateOptions = {
    noDefaultUser?: boolean;
};
export declare class Project implements BoxAdaptersContext, Terminable, TerminableOwner {
    #private;
    static new(env: ProjectEnv, options?: ProjectCreateOptions): Project;
    static load(env: ProjectEnv, arrayBuffer: ArrayBuffer): Project;
    static loadAnyVersion(env: ProjectEnv, arrayBuffer: ArrayBuffer): Promise<Project>;
    static fromSkeleton(env: ProjectEnv, skeleton: ProjectSkeleton, followFirstUser?: boolean): Project;
    readonly boxGraph: BoxGraph<BoxIO.TypeMap>;
    readonly rootBox: RootBox;
    readonly userInterfaceBoxes: ReadonlyArray<UserInterfaceBox>;
    readonly primaryAudioBusBox: AudioBusBox;
    readonly primaryAudioUnitBox: AudioUnitBox;
    readonly timelineBox: TimelineBox;
    readonly api: ProjectApi;
    readonly captureDevices: CaptureDevices;
    readonly editing: Editing;
    readonly selection: VertexSelection;
    readonly deviceSelection: FilteredSelection<DeviceBoxAdapter>;
    readonly regionSelection: FilteredSelection<AnyRegionBoxAdapter>;
    readonly boxAdapters: BoxAdapters;
    readonly userEditingManager: UserEditingManager;
    readonly parameterFieldAdapters: ParameterFieldAdapters;
    readonly liveStreamReceiver: LiveStreamReceiver;
    readonly midiLearning: MIDILearning;
    readonly mixer: Mixer;
    readonly tempoMap: TempoMap;
    readonly overlapResolver: RegionOverlapResolver;
    readonly timelineFocus: TimelineFocus;
    readonly engine: EngineFacade;
    readonly audioUnitFreeze: AudioUnitFreeze;
    private constructor();
    startAudioWorklet(restart?: RestartWorklet, options?: ProcessorOptions): EngineWorklet;
    handleCpuOverload(): void;
    startRecording(countIn?: boolean): void;
    stopRecording(): void;
    isRecording(): boolean;
    follow(box: UserInterfaceBox): void;
    own<T extends Terminable>(terminable: T): T;
    ownAll<T extends Terminable>(...terminables: Array<T>): void;
    spawn(): Terminator;
    get env(): ProjectEnv;
    get rootBoxAdapter(): RootBoxAdapter;
    get timelineBoxAdapter(): TimelineBoxAdapter;
    get sampleManager(): SampleLoaderManager;
    get soundfontManager(): SoundfontLoaderManager;
    get clipSequencing(): ClipSequencing;
    get isAudioContext(): boolean;
    get isMainThread(): boolean;
    get primaryAudioUnitBoxAdapter(): AudioUnitBoxAdapter;
    get liveStreamBroadcaster(): LiveStreamBroadcaster;
    get skeleton(): ProjectSkeleton;
    receivedMIDIFromEngine(midiDeviceId: string, data: Uint8Array, relativeTimeInMs: number): void;
    collectSampleUUIDs(): ReadonlyArray<UUID.Bytes>;
    restartRecording(): void;
    toArrayBuffer(): ArrayBufferLike;
    copy(env?: Partial<ProjectEnv>): Project;
    invalid(): boolean;
    lastRegionAction(): ppqn;
    trackUserCreatedSample(uuid: UUID.Bytes): void;
    terminate(): void;
}
//# sourceMappingURL=Project.d.ts.map