import { Temporal } from "@js-temporal/polyfill";
import { URLPattern } from "urlpattern-polyfill";
import "../kv-C7sopW2E.js";
import "../docloader-CxWcuWqQ.js";
import "../client-bgSdkFa2.js";
import "../vocab-SOE1ifCr.js";
import "../actor-C22bXuuC.js";
import "../http-DqSNLFNY.js";
import "../owner-CQPnQVtf.js";
import "../mod-Cxt4Kpf6.js";
import "../mod-DBzN0aCM.js";
import { Federation } from "../context-CQsAT7xk.js";
import "../mq-CRGm1e_F.js";

//#region src/x/hono.d.ts
interface HonoRequest {
  raw: Request;
}
interface HonoContext {
  req: HonoRequest;
  res: Response;
}
type HonoMiddleware<THonoContext extends HonoContext> = (ctx: THonoContext, next: () => Promise<void>) => Promise<Response | void>;
/**
 * A factory function to create a context data for the {@link Federation}
 * object.
 *
 * @deprecated This type has been moved to `@fedify/hono` package.
 *             Import `ContextDataFactory` from `@fedify/hono` instead.
 *             This type will be removed in Fedify v2.0.
 *
 * @template TContextData A type of the context data for the {@link Federation}
 *                         object.
 * @template THonoContext A type of the Hono context.
 * @param context A Hono context object.
 * @returns A context data for the {@link Federation} object.
 */
type ContextDataFactory<TContextData, THonoContext> = (context: THonoContext) => TContextData | Promise<TContextData>;
/**
 * Create a Hono middleware to integrate with the {@link Federation} object.
 *
 * @deprecated This function has been moved to `@fedify/hono` package.
 *             Import `federation` from `@fedify/hono` instead.
 *             This function will be removed in Fedify v2.0.
 *
 * @template TContextData A type of the context data for the {@link Federation}
 *                         object.
 * @template THonoContext A type of the Hono context.
 * @param federation A {@link Federation} object to integrate with Hono.
 * @param contextDataFactory A function to create a context data for the
 *                           {@link Federation} object.
 * @returns A Hono middleware.
 */
declare function federation<TContextData, THonoContext extends HonoContext>(federation: Federation<TContextData>, contextDataFactory: ContextDataFactory<TContextData, THonoContext>): HonoMiddleware<THonoContext>;
//#endregion
export { ContextDataFactory, federation };