import type { Env, MiddlewareHandler } from 'hono'
import { html } from 'hono/html'
import type { DistSwaggerUIOptions } from './swagger/renderer'
import { renderSwaggerUIOptions } from './swagger/renderer'
import type { AssetURLs } from './swagger/resource'
import { remoteAssets } from './swagger/resource'
type OriginalSwaggerUIOptions = {
version?: string
/**
* manuallySwaggerUIHtml is a string that is used to render SwaggerUI.
* If this is set, all other options will be ignored except version.
* The string will be inserted into the body of the HTML.
* This is useful when you want to fully customize the UI.
*
* @example
* ```ts
* const swaggerUI = SwaggerUI({
* manuallySwaggerUIHtml: (asset) => `
*