import { BehaviorSubject, Observable } from 'rxjs';
import { BrowserPermission, BrowserPermissionState } from './BrowserPermission';
export type InputDeviceStatus = 'enabled' | 'disabled' | undefined;
export type TrackDisableMode = 'stop-tracks' | 'disable-tracks';
export declare abstract class DeviceManagerState<C = MediaTrackConstraints> {
    protected statusSubject: BehaviorSubject<InputDeviceStatus>;
    protected optimisticStatusSubject: BehaviorSubject<InputDeviceStatus>;
    protected mediaStreamSubject: BehaviorSubject<MediaStream | undefined>;
    protected rootMediaStreamSubject: BehaviorSubject<MediaStream | undefined>;
    protected selectedDeviceSubject: BehaviorSubject<string | undefined>;
    protected defaultConstraintsSubject: BehaviorSubject<C | undefined>;
    /**
     * @internal
     */
    prevStatus: InputDeviceStatus;
    /**
     * An Observable that emits the current media stream, or `undefined` if the device is currently disabled.
     */
    mediaStream$: Observable<MediaStream | undefined>;
    /**
     * An Observable that emits the raw device media stream (before any filters are applied),
     * or `undefined` if the device is currently disabled. When no filters are active, this
     * emits the same stream as `mediaStream$`.
     */
    rootMediaStream$: Observable<MediaStream | undefined>;
    /**
     * An Observable that emits the currently selected device
     */
    selectedDevice$: Observable<string | undefined>;
    /**
     * An Observable that emits the device status
     */
    status$: Observable<InputDeviceStatus>;
    /**
     * An Observable the reflects the requested device status. Useful for optimistic UIs
     */
    optimisticStatus$: Observable<InputDeviceStatus>;
    /**
     * The default constraints for the device.
     */
    defaultConstraints$: Observable<C | undefined>;
    /**
     * An observable that will emit `true` if browser/system permission
     * is granted (or at least hasn't been denied), `false` otherwise.
     */
    hasBrowserPermission$: Observable<boolean>;
    /**
     * An observable that emits with browser permission state changes.
     * Gives more granular visiblity than hasBrowserPermission$.
     */
    browserPermissionState$: Observable<BrowserPermissionState>;
    /**
     * An observable that emits `true` when SDK is prompting for browser permission
     * (i.e. browser's UI for allowing or disallowing device access is visible)
     */
    isPromptingPermission$: Observable<boolean>;
    readonly disableMode: TrackDisableMode;
    /**
     * Constructs a new InputMediaDeviceManagerState instance.
     *
     * @param disableMode the disable mode to use.
     * @param permission the BrowserPermission to use for querying.
     * `undefined` means no permission is required.
     */
    constructor(disableMode: TrackDisableMode, permission: BrowserPermission | undefined);
    /**
     * The device status
     */
    get status(): InputDeviceStatus;
    /**
     * The requested device status. Useful for optimistic UIs
     */
    get optimisticStatus(): InputDeviceStatus;
    /**
     * The currently selected device
     */
    get selectedDevice(): string | undefined;
    /**
     * The current media stream, or `undefined` if the device is currently disabled.
     */
    get mediaStream(): MediaStream | undefined;
    /**
     * The raw device media stream (before any filters are applied), or `undefined`
     * if the device is currently disabled. When no filters are active, this is the
     * same as `mediaStream`.
     */
    get rootMediaStream(): MediaStream | undefined;
    /**
     * @internal
     * @param status
     */
    setStatus(status: InputDeviceStatus): void;
    /**
     * @internal
     * @param pendingStatus
     */
    setPendingStatus(pendingStatus: InputDeviceStatus): void;
    /**
     * Updates the `mediaStream` state variable.
     *
     * @internal
     * @param stream the stream to set.
     * @param rootStream the root stream, applicable when filters are used
     * as this is the stream that holds the actual deviceId information.
     */
    setMediaStream(stream: MediaStream | undefined, rootStream: MediaStream | undefined): void;
    /**
     * @internal
     * @param deviceId the device id to set.
     */
    setDevice(deviceId: string | undefined): void;
    /**
     * Gets the default constraints for the device.
     */
    get defaultConstraints(): C | undefined;
    /**
     * Sets the default constraints for the device.
     *
     * @internal
     * @param constraints the constraints to set.
     */
    setDefaultConstraints(constraints: C | undefined): void;
    protected abstract getDeviceIdFromStream(stream: MediaStream): string | undefined;
}
