import type { Context as HonoContext } from "hono";
import type { Service } from "../services/service";

export type CreateContextOptions = {
	context: HonoContext;
	serviceContainer?: Service;
};

export async function createContext({
	context,
	serviceContainer,
}: CreateContextOptions) {
	return {
		requestContext: context,
		serviceContainer,
	};
}

export type Context = Awaited<ReturnType<typeof createContext>>;
