import { cookies } from 'next/headers';
import { NextResponse } from 'next/server';
import type { NextRequest } from 'next/server';

export function middleware(req: NextRequest) {
  const cookieStore = cookies();
  const accessToken = cookieStore.get('COOKIES_USER_ACCESS_TOKEN')?.value;
  if (!accessToken) {
    return NextResponse.redirect(new URL('/', req.url));
  }
  return NextResponse.next();
}



export const config = {
  matcher: [],
  // matcher: ['/dashboard','/job-management/:path*','/data-management/:path*','/lists/:path*','/automation/:path*'],

};

