import { PublishOption, TrackType } from '../gen/video/sfu/models/models';
import type { OptimalVideoLayer } from './layers';
import type { PublishBundle } from './types';
export declare class TransceiverCache {
    private readonly cache;
    private readonly layers;
    /**
     * An array maintaining the order how transceivers were added to the peer connection.
     * This is needed because some browsers (Firefox) don't reliably report
     * trackId and `mid` parameters.
     */
    private readonly transceiverOrder;
    /**
     * Adds a transceiver to the cache.
     */
    add: (bundle: PublishBundle) => void;
    /**
     * Gets the transceiver for the given publish option.
     */
    get: (publishOption: PublishOption) => PublishBundle | undefined;
    /**
     * Gets the transceiver for the given publish option id and track type.
     */
    getBy: (publishOptionId: number, trackType: TrackType) => PublishBundle | undefined;
    /**
     * Updates the cached bundle with the given patch.
     */
    update: (publishOption: PublishOption, patch: Partial<PublishBundle>) => void;
    /**
     * Checks if the cache has the given publish option.
     */
    has: (publishOption: PublishOption) => boolean;
    /**
     * Finds the first transceiver that satisfies the given predicate.
     */
    find: (predicate: (bundle: PublishBundle) => boolean) => PublishBundle | undefined;
    /**
     * Provides all the items in the cache.
     */
    items: () => PublishBundle[];
    /**
     * Init index of the transceiver in the cache.
     */
    indexOf: (transceiver: RTCRtpTransceiver) => number;
    /**
     * Gets cached video layers for the given track.
     */
    getLayers: (publishOption: PublishOption) => OptimalVideoLayer[] | undefined;
    /**
     * Sets the video layers for the given track.
     */
    setLayers: (publishOption: PublishOption, layers?: OptimalVideoLayer[]) => void;
    private findLayer;
}
