import { Temporal } from "@js-temporal/polyfill";
import { URLPattern } from "urlpattern-polyfill";
import { g as Federation } from "../context-xfiK4xM5.js";

//#region src/x/sveltekit.d.ts
type RequestEvent = {
  request: Request;
};
type HookParams = {
  event: RequestEvent;
  resolve: (event: RequestEvent) => Promise<Response>;
};
/**
 * Create a SvelteKit hook handler to integrate with the {@link Federation}
 * object.
 *
 * @deprecated This function has been moved to `@fedify/sveltekit` package.
 *             Import `fedifyHook` from `@fedify/sveltekit` instead.
 *             This function will be removed in Fedify v2.0.
 *
 * @example hooks.server.ts
 * ``` typescript
 * import { federation } from "./federation"; // Import the `Federation` object
 *
 * export const handle = fedifyHook(federation, () => undefined);
 * ```
 *
 * @template TContextData A type of the context data for the {@link Federation}
 *                         object.
 * @param federation A {@link Federation} object to integrate with SvelteKit.
 * @param createContextData A function to create a context data for the
 *                          {@link Federation} object.
 * @returns A SvelteKit hook handler.
 * @since 1.3.0
 */
declare function fedifyHook<TContextData>(federation: Federation<TContextData>, createContextData: (event: RequestEvent) => TContextData | Promise<TContextData>): (params: HookParams) => Promise<Response>;
//#endregion
export { fedifyHook };