import {defineRouting} from 'next-intl/routing';
import {createNavigation} from 'next-intl/navigation';

export const routing = defineRouting({
  locales: ['id', 'en'],
  defaultLocale: 'id',
  localePrefix: 'as-needed', // Don't show /id for the default locale
  localeDetection: false // Force id on first visit regardless of browser lang
});

export const {Link, redirect, usePathname, useRouter, getPathname} = createNavigation(routing);
