package ui

import "../core"

can_open_screen :: proc(state: core.Comic_State, target: App_Screen) -> bool {
	switch target {
	case .Story:
		return true
	case .Script:
		return len(state.script.pages) > 0
	case .Characters:
		return len(state.script.pages) > 0
	case .Panels:
		return len(state.script.pages) > 0
	case .Layout:
		return len(state.panel_images) > 0
	case .Bubbles:
		return len(state.page_layouts) > 0
	case .Export:
		return len(state.page_layouts) > 0
	case .Community:
		return true
	}
	return false
}

next_step_for_screen :: proc(screen: App_Screen) -> core.Workflow_Step {
	switch screen {
	case .Story: return .Story_Input
	case .Script: return .Script_Review
	case .Characters: return .Character_Setup
	case .Panels: return .Generating_Panels
	case .Layout: return .Layout
	case .Bubbles: return .Speech_Bubbles
	case .Export: return .Complete
	case .Community: return .Complete
	}
	return .Story_Input
}
