class_name ChapterList
extends Resource

@export var chapters: Array[ChapterInfo] = []


func get_chapter_by_index(index: int) -> ChapterInfo:
	for chapter: ChapterInfo in chapters:
		if chapter.chapter_index == index:
			return chapter

	return null
