import type { AccessGuard } from '../types.js'; import type { HttpContext } from '@adonisjs/core/http'; /** * Create a middleware function that gates access using the shouldShow callback. * Returns 403 if the callback returns false. * * The guard is awaited, so an async callback (the usual shape when it has to * consult `ctx.auth` or the database) is resolved before the decision is made. * Returning the promise unawaited would make every async guard pass, since a * pending promise is truthy. * * Shared by stats, debug, and dashboard route registrars. */ export declare function createAccessMiddleware(shouldShow: AccessGuard): (ctx: HttpContext, next: () => Promise) => Promise;