import { BlankEnv } from 'hono/types';
import { Env, Hono, Context } from 'hono';
import { HonoOptions } from 'hono/hono-base';
import { ServerBuild, AppLoadContext } from 'react-router';

type HonoServerOptions<E extends Env = BlankEnv> = {
    configure?: <E extends Env = BlankEnv>(app: Hono<E>) => Promise<void> | void;
    getLoadContext?: (c: Context, options: {
        build: ServerBuild;
        mode?: string;
    }) => Promise<AppLoadContext> | AppLoadContext;
    honoOptions?: HonoOptions<E>;
};

export type { HonoServerOptions as H };
