import type { RouteType, AstroUserConfig, AstroRenderer } from '../@types/astro.js';
import type { AstroComponentFactory } from "../runtime/server/index.js";
/**
 * Options to be passed when rendering a route
 */
export type ContainerRenderOptions = {
    /**
     * If your component renders slots, that's where you want to fill the slots.
     * A single slot should have the `default` field:
     *
     * ## Examples
     *
     * **Default slot**
     *
     * ```js
     * container.renderToString(Component, { slots: { default: "Some value"}});
     * ```
     *
     * **Named slots**
     *
     * ```js
     * container.renderToString(Component, { slots: { "foo": "Some value", "bar": "Lorem Ipsum" }});
     * ```
     */
    slots?: Record<string, any>;
    /**
     * The request is used to understand which path/URL the component is about to render.
     *
     * Use this option in case your component or middleware needs to read information like `Astro.url` or `Astro.request`.
     */
    request?: Request;
    /**
     * Useful for dynamic routes. If your component is something like `src/pages/blog/[id]/[...slug]`, you'll want to provide:
     * ```js
     * container.renderToString(Component, { params: ["id", "...slug"] });
     * ```
     */
    params?: Record<string, string | undefined>;
    /**
     * Useful if your component needs to access some locals without the use a middleware.
     * ```js
     * container.renderToString(Component, { locals: { getSomeValue() {} } });
     * ```
     */
    locals?: App.Locals;
    /**
     * Useful in case you're attempting to render an errored route.
     */
    status?: number;
    /**
     * Useful in case you're attempting to render an endpoint:
     * ```js
     * container.renderToString(Endpoint, { routeType: "endpoint" });
     * ```
     */
    routeType?: RouteType;
    /**
     * Useful for dynamic routes. If your component is something like `src/pages/blog/[id]/[...slug]`, you'll want to provide:
     * ```js
     * container.renderToString(Component, { route: "/blog/[id]/[...slug]" });
     * ```
     */
    route?: string;
};
export type AstroContainerUserConfig = Omit<AstroUserConfig, 'integrations' | 'adapter'>;
/**
 * Options that are used for the entire lifecycle of the current instance of the container.
 */
export type AstroContainerOptions = {
    /**
     * @default false
     *
     * @description
     *
     * Enables streaming during rendering
     *
     * ## Example
     *
     * ```js
     * const container = await AstroContainer.create({
     * 	streaming: true
     * });
     * ```
     */
    streaming?: boolean;
    /**
     * @default []
     * @description
     *
     * List or renderers to use when rendering components. Usually they are entry points
     *
     * ## Example
     *
     * ```js
     * const container = await AstroContainer.create({
     * 	renderers: [{
     * 	  name: "@astrojs/react"
     * 	  client: "@astrojs/react/client.js"
     * 	  server: "@astrojs/react/server.js"
     * 	}]
     * });
     * ```
     */
    renderers?: AstroRenderer[];
    /**
     * @default {}
     * @description
     *
     * A subset of the astro configuration object.
     *
     * ## Example
     *
     * ```js
     * const container = await AstroContainer.create({
     * 	astroConfig: {
     * 		trailingSlash: "never"
     * 	}
     * });
     * ```
     */
    astroConfig?: AstroContainerUserConfig;
};
export declare class unstable_AstroContainer {
    #private;
    private constructor();
    /**
     * Creates a new instance of a container.
     *
     * @param {AstroContainerOptions=} containerOptions
     */
    static create(containerOptions?: AstroContainerOptions): Promise<unstable_AstroContainer>;
    /**
     *
     * @param manifest
     * @private
     */
    private static createFromManifest;
    /**
     * Use this method to manually insert a route inside the container.
     *
     * This method is useful if you're rending a component that attempt to render redirect or a rewrite.
     *
     * @param {object} options
     * @param {string} options.path The path of the route. It has to match what you see in a URL browser, e.g. `/blog/12334/first-post`
     * @param {ComponentInstance} options.componentInstance The a compile instance of the Astro component.
     * @param {string[]} options.params The params of the route. Use these when your route is dynamic. For a route `/blog/[id]/[...dynamic]`, the params are `["id", "...dynamic"]`
     * @param {RouteType} options.type The type of route.
     */
    private insertRoute;
    /**
     * @description
     * It renders a component and returns the result as a string.
     *
     * ## Example
     *
     * ```js
     * import Card from "../src/components/Card.astro";
     *
     * const container = await AstroContainer.create();
     * const result = await container.renderToString(Card);
     *
     * console.log(result); // it's a string
     * ```
     *
     *
     * @param {AstroComponentFactory} component The instance of the component.
     * @param {ContainerRenderOptions=} options Possible options to pass when rendering the component.
     */
    renderToString(component: AstroComponentFactory, options?: ContainerRenderOptions): Promise<string>;
    /**
     * @description
     * It renders a component and returns the `Response` as result of the rendering phase.
     *
     * ## Example
     *
     * ```js
     * import Card from "../src/components/Card.astro";
     *
     * const container = await AstroContainer.create();
     * const response = await container.renderToResponse(Card);
     *
     * console.log(response.status); // it's a number
     * ```
     *
     *
     * @param {AstroComponentFactory} component The instance of the component.
     * @param {ContainerRenderOptions=} options Possible options to pass when rendering the component.
     */
    renderToResponse(component: AstroComponentFactory, options?: ContainerRenderOptions): Promise<Response>;
}
