package input

import (
	tea "github.com/charmbracelet/bubbletea"

	"github.com/genai-io/san/internal/app/conv"
	"github.com/genai-io/san/internal/llm"
)

// OverlayDeps holds all dependencies needed by overlay selector handlers.
type OverlayDeps struct {
	State *Model
	Conv  *conv.ConversationModel
	Cwd   string

	CommitMessages    func() []tea.Cmd
	CommitAllMessages func() []tea.Cmd

	SwitchProvider          func(llm.Provider)
	SetCurrentModel         func(*llm.CurrentModelInfo)
	PrintWelcome            func(modelID string) tea.Cmd
	ClearCachedInstructions func()
	RefreshMemoryContext    func(cwd, reason string)
	FireFileChanged         func(path, tool string)
	ReloadPluginState       func() error
	LoadSession             func(string) error

	// SetActiveIdentity persists settings.identity (empty = default) and
	// triggers an agent rebuild so the new persona takes effect.
	SetActiveIdentity func(name string) error
	// DispatchSlashCommand runs a slash command as if the user typed it.
	// Used by selector hotkeys (Shift+N, Shift+E) to delegate to the
	// existing /identity create | edit handlers.
	DispatchSlashCommand func(cmd string) tea.Cmd
}
