package app

import (
	"strings"
)

func (m *uiModel) reviewerInvocationState() (bool, string) {
	mode := strings.ToLower(strings.TrimSpace(m.cachedRuntimeStatus().ReviewerFrequency))
	if mode == "" {
		mode = strings.ToLower(strings.TrimSpace(m.reviewerMode))
	}
	if mode == "" {
		mode = "off"
	}
	return mode != "off", mode
}

func (m *uiModel) fastModeState() (bool, bool) {
	status := m.cachedRuntimeStatus()
	if !status.FastModeAvailable && m.fastModeAvailable {
		status.FastModeAvailable = true
	}
	return status.FastModeAvailable, status.FastModeEnabled
}
