declare module '@ember/-internals/glimmer/lib/renderer' {
    import type { InternalOwner } from "@ember/-internals/owner";
    import type { Bounds, Cursor, DebugRenderTree, Environment, DynamicScope as GlimmerDynamicScope, RenderResult as GlimmerRenderResult, Template, TemplateFactory, EvaluationContext, TreeBuilder, ClassicResolver } from "@glimmer/interfaces";
    import type { Nullable } from "@ember/-internals/utility-types";
    import type { Reference } from "@glimmer/reference";
    import type { CurriedValue } from "@glimmer/runtime";
    import { clientBuilder } from "@glimmer/runtime";
    import type { SimpleDocument, SimpleElement, SimpleNode } from "@simple-dom/interface";
    import RSVP from "rsvp";
    import type Component from "@ember/-internals/glimmer/lib/component";
    import type ClassicComponent from "@ember/-internals/glimmer/lib/component";
    import { BOUNDS } from "@ember/-internals/glimmer/lib/component-managers/curly";
    import ResolverImpl from "@ember/-internals/glimmer/lib/resolver";
    import type { OutletState } from "@ember/-internals/glimmer/lib/utils/outlet";
    import OutletView from "@ember/-internals/glimmer/lib/views/outlet";
    export type IBuilder = (env: Environment, cursor: Cursor) => TreeBuilder;
    export interface View {
        parentView: Nullable<View>;
        renderer: Renderer;
        tagName: string | null;
        elementId: string | null;
        isDestroying: boolean;
        isDestroyed: boolean;
        [BOUNDS]: Bounds | null;
    }
    export class DynamicScope implements GlimmerDynamicScope {
        view: View | null;
        outletState: Reference<OutletState | undefined>;
        constructor(view: View | null, outletState: Reference<OutletState | undefined>);
        child(): DynamicScope;
        get(key: "outletState"): Reference<OutletState | undefined>;
        set(key: "outletState", value: Reference<OutletState | undefined>): Reference<OutletState | undefined>;
    }
    type RootState = ClassicRootState | ComponentRootState;
    class ComponentRootState {
        #private;
        readonly type = "component";
        constructor(state: RendererState, definition: object, options: {
            into: Cursor;
            args?: Record<string, unknown>;
        });
        isFor(_component: ClassicComponent): boolean;
        render(): void;
        destroy(): void;
        get destroyed(): boolean;
        get result(): GlimmerRenderResult | undefined;
    }
    class ClassicRootState {
        root: Component | OutletView;
        readonly type = "classic";
        id: string;
        result: GlimmerRenderResult | undefined;
        destroyed: boolean;
        render: () => void;
        readonly env: Environment;
        constructor(root: Component | OutletView, context: EvaluationContext, owner: object, template: Template, self: Reference<unknown>, parentElement: SimpleElement, dynamicScope: DynamicScope, builder: IBuilder);
        isFor(possibleRoot: unknown): boolean;
        destroy(): void;
    }
    export function _resetRenderers(): void;
    export function renderSettled(): RSVP.Promise<void>;
    interface ViewRegistry {
        [viewId: string]: unknown;
    }
    type Resolver = ClassicResolver;
    interface RendererData {
        owner: object;
        context: EvaluationContext;
        builder: IBuilder;
    }
    export class RendererState {
        #private;
        static create(data: RendererData, renderer: BaseRenderer): RendererState;
        private constructor();
        get debug(): {
            roots: RootState[];
            inRenderTransaction: boolean;
            isInteractive: boolean;
        };
        get roots(): RootState[];
        get owner(): object;
        get builder(): IBuilder;
        get context(): EvaluationContext;
        get env(): Environment;
        get isInteractive(): boolean;
        renderRoot(root: RootState, renderer: BaseRenderer): RootState;
        renderRoots(renderer: BaseRenderer): void;
        scheduleRevalidate(renderer: BaseRenderer): void;
        isValid(): boolean;
        revalidate(renderer: BaseRenderer): void;
        clearAllRoots(renderer: BaseRenderer): void;
    }
    type IntoTarget = Cursor | Element | SimpleElement;
    /**
     * The returned object from `renderComponent`
     * @public
     * @module @ember/renderer
     */
    export interface RenderResult {
        /**
         * Destroys the render tree and removes all rendered content from the element rendered into
         */
        destroy(): void;
    }
    /**
     * Render a component into a DOM element.
     *
     * @method renderComponent
     * @static
     * @for @ember/renderer
     * @param {Object} component The component to render.
     * @param {Object} options
     * @param {Element} options.into Where to render the component in to.
     * @param {Object} [options.owner] Optionally specify the owner to use. This will be used for injections, and overall cleanup.
     * @param {Object} [options.env] Optional renderer configuration
     * @param {Object} [options.args] Optionally pass args in to the component. These may be reactive as long as it is an object or object-like
     * @public
     */
    export function renderComponent(
        /**
         * The component definition to render.
         *
         * Any component that has had its manager registered is valid.
         * For the component-types that ship with ember, manager registration
         * does not need to be worried about.
         */
        component: object,
        { owner, env, into, args, }: {
            /**
             * The element to render the component in to.
             */
            into: IntoTarget;
            /**
             * Optional owner. Defaults to `{}`, can be any object, but will need to implement the [Owner](https://api.emberjs.com/ember/release/classes/Owner) API for components within this render tree to access services.
             */
            owner?: object;
            /**
             * Optionally configure the rendering environment
             */
            env?: {
                /**
                 * When false, modifiers will not run.
                 */
                isInteractive?: boolean;
                /**
                 * All other options are forwarded to the underlying renderer.
                 * (its API is currently private and out of scope for this RFC,
                 *  so passing additional things here is also considered private API)
                 */
                [rendererOption: string]: unknown;
            };
            /**
             * These args get passed to the rendered component
             *
             * If your args are reactive, re-rendering will happen automatically.
             *
             */
            args?: Record<string, unknown>;
        }
    ): RenderResult;
    export class BaseRenderer {
        static strict(owner: object, document: SimpleDocument | Document, options: {
            isInteractive: boolean;
            hasDOM?: boolean;
        }): BaseRenderer;
        readonly state: RendererState;
        constructor(owner: object, envOptions: {
            isInteractive: boolean;
            hasDOM: boolean;
        }, document: SimpleDocument, resolver: Resolver, builder: IBuilder);
        get debugRenderTree(): DebugRenderTree;
        isValid(): boolean;
        destroy(): void;
        render(component: object, options: {
            into: IntoTarget;
            args?: Record<string, unknown>;
        }): RootState;
        rerender(): void;
    }
    export class Renderer extends BaseRenderer {
        static strict(owner: object, document: SimpleDocument | Document, options: {
            isInteractive: boolean;
            hasDOM?: boolean;
        }): BaseRenderer;
        private _rootTemplate;
        private _viewRegistry;
        static create(props: {
            _viewRegistry: any;
        }): Renderer;
        constructor(owner: InternalOwner, document: SimpleDocument, env: {
            isInteractive: boolean;
            hasDOM: boolean;
        }, rootTemplate: TemplateFactory, viewRegistry: ViewRegistry, builder?: typeof clientBuilder, resolver?: ResolverImpl);
        appendOutletView(view: OutletView, target: SimpleElement): void;
        appendTo(view: ClassicComponent, target: SimpleElement): void;
        _appendDefinition(root: OutletView | ClassicComponent, definition: CurriedValue, target: SimpleElement): void;
        cleanupRootFor(component: ClassicComponent): void;
        remove(view: ClassicComponent): void;
        get _roots(): RootState[];
        get _inRenderTransaction(): boolean;
        get _isInteractive(): boolean;
        get _context(): EvaluationContext;
        register(view: any): void;
        unregister(view: any): void;
        getElement(component: View): Nullable<Element>;
        getBounds(component: View): {
            parentElement: SimpleElement;
            firstNode: SimpleNode;
            lastNode: SimpleNode;
        };
    }
    export {};
}