import '../../assert/js/assert.js';
import '../../globals.js';
import IntentionalAny from '../../phet-core/js/types/IntentionalAny.js';
import StrictOmit from '../../phet-core/js/types/StrictOmit.js';
import PhetioDynamicElementContainer, { ClearOptions, PhetioDynamicElementContainerOptions } from './PhetioDynamicElementContainer.js';
import PhetioObject from './PhetioObject.js';
import Tandem from './Tandem.js';
import IOType from './types/IOType.js';
type SelfOptions = {
    disposeOnClear?: boolean;
    disposeCreatedOnStateSet?: boolean;
};
export type PhetioCapsuleOptions = SelfOptions & StrictOmit<PhetioDynamicElementContainerOptions, 'containerSuffix'>;
declare class PhetioCapsule<T extends PhetioObject, P extends IntentionalAny[] = []> extends PhetioDynamicElementContainer<T, P> {
    private element;
    private readonly disposeOnClear;
    private readonly disposeCreatedOnStateSet;
    /**
     * @param createElement - function that creates the encapsulated element
     * @param defaultArguments - arguments passed to createElement when creating the archetype
     * @param [providedOptions]
     */
    constructor(createElement: (t: Tandem, ...p: P) => T, defaultArguments: P | (() => P), providedOptions?: PhetioCapsuleOptions);
    /**
     * Dispose the underlying element.  Called by the PhetioStateEngine so the capsule element can be recreated with the
     * correct state.
     */
    disposeElement(): void;
    hasElement(): boolean;
    /**
     * Creates the element if it has not been created yet, and returns it.
     */
    getElement(...argsForCreateFunction: P): T;
    /**
     * PhetioCapsule will dispose its element, clearing things up and getting ready for setState, unless
     * this.disposeOnClear opts out of this behavior, in which case the element should fully support mutating itself
     * during state setting.
     */
    clear(providedOptions?: ClearOptions): void;
    /**
     * Primarily for internal use, clients should usually use getElement().
     * @param argsForCreateFunction
     * @param [fromStateSetting] - used for validation during state setting, see PhetioDynamicElementContainer.disposeElement() for documentation
     * (phet-io)
     */
    create(argsForCreateFunction: P, fromStateSetting?: boolean): T;
    /**
     * Parametric IOType constructor.  Given an element type, this function returns a PhetioCapsule IOType.
     * This caching implementation should be kept in sync with the other parametric IOType caching implementations.
     * @param parameterType
     * @constructor
     */
    static PhetioCapsuleIO: <ParameterType extends PhetioObject, ParameterStateType>(parameterType: IOType<ParameterType, ParameterStateType>) => IOType;
}
export default PhetioCapsule;
//# sourceMappingURL=PhetioCapsule.d.ts.map