import * as THREE from 'three';
import * as React from 'react';
import * as ReactThreeFiber from '../three-types';
import { SetState, UseStore } from 'zustand';
import { Instance, InstanceProps } from './renderer';
export interface Intersection extends THREE.Intersection {
    eventObject: THREE.Object3D;
}
export declare type Subscription = {
    ref: React.MutableRefObject<RenderCallback>;
    priority: number;
};
export declare type PixelRatio = number | [min: number, max: number];
export declare type Size = {
    width: number;
    height: number;
};
export declare type Viewport = Size & {
    pixelRatio: number;
    factor: number;
    distance: number;
    aspect: number;
};
export declare type Camera = THREE.OrthographicCamera | THREE.PerspectiveCamera;
export declare type RenderCallback = (state: RootState, delta: number) => void;
export declare const isRenderer: (def: THREE.WebGLRenderer) => def is THREE.WebGLRenderer;
export declare const isOrthographicCamera: (def: THREE.Camera) => def is THREE.OrthographicCamera;
export declare type RootState = {
    gl: THREE.WebGLRenderer;
    scene: THREE.Scene & Instance;
    camera: Camera;
    raycaster: THREE.Raycaster;
    mouse: THREE.Vector2;
    clock: THREE.Clock;
    vr: boolean;
    noninteractive: boolean;
    linear: boolean;
    frameloop: boolean;
    updateCamera: boolean;
    size: Size;
    viewport: Viewport & {
        getCurrentViewport: (camera: Camera, target: THREE.Vector3, size: Size) => Omit<Viewport, 'pixelRatio'>;
    };
    invalidate: () => void;
    intersect: (event?: any) => void;
    setSize: (width: number, height: number) => void;
    setCamera: (camera: Camera) => void;
    setPixelRatio: (pixelRatio: PixelRatio) => void;
    onCreated?: (props: RootState) => Promise<any> | void;
    onPointerMissed?: () => void;
    internal: {
        manual: number;
        frames: number;
        lastProps: StoreProps;
        interaction: any[];
        subscribers: Subscription[];
        captured: Intersection[] | undefined;
        initialClick: [x: number, y: number];
        initialHits: THREE.Object3D[];
        set: SetState<RootState>;
        subscribe: (callback: React.MutableRefObject<RenderCallback>, priority?: number) => () => void;
    };
};
export declare type FilterFunction = (items: THREE.Intersection[], state: RootState) => THREE.Intersection[];
export declare type ComputeOffsetsFunction = (event: any, state: RootState) => {
    offsetX: number;
    offsetY: number;
};
export declare type StoreProps = {
    gl: THREE.WebGLRenderer;
    size: Size;
    vr?: boolean;
    shadows?: boolean | Partial<THREE.WebGLShadowMap>;
    linear?: boolean;
    orthographic?: boolean;
    noninteractive?: boolean;
    updateCamera?: boolean;
    frameloop?: boolean;
    pixelRatio?: PixelRatio;
    raycaster?: Partial<THREE.Raycaster> & {
        filter?: FilterFunction;
        computeOffsets?: ComputeOffsetsFunction;
    };
    camera?: Partial<ReactThreeFiber.Object3DNode<THREE.Camera, typeof THREE.Camera> & ReactThreeFiber.Object3DNode<THREE.PerspectiveCamera, typeof THREE.PerspectiveCamera> & ReactThreeFiber.Object3DNode<THREE.OrthographicCamera, typeof THREE.OrthographicCamera>>;
    onCreated?: (props: RootState) => Promise<any> | void;
    onPointerMissed?: () => void;
};
declare const context: React.Context<UseStore<RootState>>;
declare const createStore: (applyProps: (instance: Instance, newProps: InstanceProps, oldProps?: InstanceProps | undefined, accumulative?: boolean | undefined) => void, invalidate: (state?: boolean | RootState | undefined, frames?: number | undefined) => void, props: StoreProps) => UseStore<RootState>;
export { createStore, context };
