import type {NextConfig} from 'next'
import createNextIntlPlugin from 'next-intl/plugin'

const withNextIntl = createNextIntlPlugin({
	experimental: {
		createMessagesDeclaration: './messages/uk.json'
	}
})

const nextConfig: NextConfig = {
	experimental: {
		authInterrupts: true
		// serverActions: {
		// 	bodySizeLimit: '20mb'
		// }
		// // staleTimes: {
		// 	dynamic: 30,
		// 	static: 180
		// }
	},

	images: {
		formats: ['image/avif', 'image/webp'],
		dangerouslyAllowSVG: true,
		//unoptimized: true,
		remotePatterns: [
			{
				protocol: 'https',
				hostname: '*'
			}
		]
	}
}

export default withNextIntl(nextConfig)
