"""Format a list of indices into a compact range string representation.

This function takes a list of integers representing indices and formats them into a string where consecutive indices are represented as ranges (e.g., '0-3'), and non-consecutive indices are listed individually (e.g., '0,2-3,5'). The ranges are separated by commas.

Args:
    indices (List[int]): A list of integers representing indices. The list should be sorted in ascending order for correct range detection.

Returns:
    str: A string representation of the indices, formatted as ranges where applicable. If the input list is empty, an empty string is returned.

Examples:
    >>> format_index_ranges([0, 1, 2, 3])
    '0-3'
    >>> format_index_ranges([0, 2, 3, 5])
    '0,2-3,5'
    >>> format_index_ranges([1, 3, 5, 7])
    '1,3,5,7'
    >>> format_index_ranges([10, 11, 12, 14, 15])
    '10-12,14-15'
"""