export const loginBackgroundImages = [
  '/login-backgrounds/pulau-tenggol-1.jpg',
  '/login-backgrounds/pulau-tenggol-2.jpg',
  '/login-backgrounds/pulau-tenggol-3.png',
]

export const loginBackgroundSwitchMs = 7000

export function pickRandomBackgroundIndex(total, excludeIndex = -1) {
  if (total <= 1) return 0

  let next = excludeIndex
  while (next === excludeIndex) {
    next = Math.floor(Math.random() * total)
  }

  return next
}
