import { t as User } from "./User-1gKoYJvW.mjs";
import { permissions, scopes, serverEnv } from "virtual:wcz-layout";
import { z } from "zod";

//#region src/middleware/authMiddleware.d.ts
declare const requiredAuthenticationMiddleware: import("@tanstack/start-client-core").RequestMiddlewareAfterServer<{}, undefined, {
  user: User;
}>;
declare const publicAuthenticationMiddleware: import("@tanstack/start-client-core").RequestMiddlewareAfterServer<{}, undefined, {
  user: User | null;
}>;
declare function authenticationMiddleware(options?: {
  optional?: false;
}): typeof requiredAuthenticationMiddleware;
declare function authenticationMiddleware(options: {
  optional: true;
}): typeof publicAuthenticationMiddleware;
declare function authenticationMiddleware(options: {
  optional: boolean;
}): typeof requiredAuthenticationMiddleware | typeof publicAuthenticationMiddleware;
declare const authorizationMiddleware: (permissionKey: keyof typeof permissions) => import("@tanstack/start-client-core").RequestMiddlewareAfterServer<{}, readonly [import("@tanstack/start-client-core").RequestMiddlewareAfterServer<{}, undefined, {
  user: User;
}>], undefined>;
//#endregion
//#region src/middleware/validationMiddleware.d.ts
declare const validationMiddleware: <T>(schema: z.ZodType<T>) => import("@tanstack/start-client-core").RequestMiddlewareAfterServer<{}, undefined, {
  data: T;
}>;
//#endregion
//#region src/middleware/csrfMiddleware.d.ts
declare const csrfMiddleware: import("@tanstack/start-client-core").RequestMiddlewareAfterServer<{}, undefined, undefined>;
//#endregion
//#region src/middleware/apiMiddleware.d.ts
interface ApiMiddlewareOptions {
  baseURL: keyof typeof serverEnv & `${string}BASE_URL${string}`;
  scopeKey: keyof typeof scopes;
}
declare const apiMiddleware: ({
  baseURL,
  scopeKey
}: ApiMiddlewareOptions) => import("@tanstack/start-client-core").RequestMiddlewareAfterServer<{}, undefined, {
  api: import("axios").AxiosInstance;
}>;
//#endregion
export { apiMiddleware, authenticationMiddleware, authorizationMiddleware, csrfMiddleware, validationMiddleware };
//# sourceMappingURL=middleware.d.mts.map