export function stepLightboxIndex(currentIndex: number, delta: number, total: number): number | null {
  if (total <= 1) {
    return null;
  }

  const nextIndex = currentIndex + delta;

  if (nextIndex < 0 || nextIndex >= total) {
    return null;
  }

  return nextIndex;
}

export function canStepLightbox(currentIndex: number, delta: number, total: number): boolean {
  return stepLightboxIndex(currentIndex, delta, total) !== null;
}
