/**
 * Middleware in Next.js
 * https://medium.com/@z22857744/middleware-in-next-js-ac3df3bd4162
 *
 * Implementing Multiple Middleware in Next.js: Combining NextAuth V(5) and Internationalization
 * https://medium.com/@tanzimhossain2/implementing-multiple-middleware-in-next-js-combining-nextauth-and-internationalization-28d5435d3187
 */
import {chain} from '@/middlewares/chain'
import {withAuthMiddleware} from '@/middlewares/withAuthMiddleware'
import {withI18nMiddleware} from '@/middlewares/withI18nMiddleware'

export default chain([withAuthMiddleware, withI18nMiddleware])

export const config = {
	matcher: [
		'/((?!api|_next/static|_next/image|favicon.ico|images|admin|img|uploads).*)'
	]
}
