import { Cookie, ServeInit } from "./deps.ts";
export interface Next { (error?: unknown): void;}
export type RequestResponse = { deleteCookie: ( name: string, attributes?: { path?: string | undefined; domain?: string | undefined; } | undefined, ) => RequestResponse; setCookie: (cookie: Cookie) => RequestResponse; headers: (headers: Headers) => RequestResponse; authorization: (type: string) => RequestResponse; contentType: (type: string) => RequestResponse; status: (status: number) => RequestResponse; send: (object: unknown) => Response | Promise<Response>; json: (object: unknown) => Response | Promise<Response>; ssr: (ssr: SSR) => SSR; html: (html: string) => Response | Promise<Response>;};
export type HttpRequest = Request;
export type RequestHandler = ( request: HttpRequest, response: RequestResponse, next?: Next,) => | void | Promise<void> | string | Promise<string> | Response | Promise<Response> | any | Promise<any>;
export type HandlerArgument = Deno.ServeHandler | RequestHandler;
export type Route = { method: string; path: string; handler: HandlerArgument;};
export type Fastro = { serve(options?: ServeInit): Promise<void>; close(): void; static(path: string, folder?: string): Fastro; get(path: string, handler: HandlerArgument): Fastro; post(path: string, handler: HandlerArgument): Fastro; put(path: string, handler: HandlerArgument): Fastro; delete(path: string, handler: HandlerArgument): Fastro; patch(path: string, handler: HandlerArgument): Fastro; options(path: string, handler: HandlerArgument): Fastro; page( path: string, ssr: SSR, handler: HandlerArgument, ): Fastro;};
export type SSRHandler = { path: string; ssr: SSR; handler: HandlerArgument;};
export type StartOptions = { flash: boolean;};
export type StringHandler = ( request?: Request, response?: RequestResponse, next?: Next,) => string;
export type RenderOptions = { title: string; style?: string; link?: string; script?: string; meta?: string; bundle?: string;};
export interface SSR { dir: (dir: string) => SSR; title: (title: string) => SSR; meta: (meta: string) => SSR; script: (script: string) => SSR; style: (style: string) => SSR; link: (link: string) => SSR; render: () => Response; _createBundle: ( bundle?: string, rootComponent?: string, rootTSX?: string, ) => void; _setRequest: (req: Request) => void; _getBundleName: () => string; setBundleName: (name: string) => SSR;}