2022-03-23 15:40:31 +11:00
|
|
|
package events
|
|
|
|
|
|
|
|
|
|
import (
|
2022-03-27 23:19:38 +00:00
|
|
|
tea "github.com/charmbracelet/bubbletea"
|
2023-04-17 08:31:03 +10:00
|
|
|
"github.com/lmika/dynamo-browse/internal/dynamo-browse/services"
|
2022-03-23 15:40:31 +11:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// Error indicates that an error occurred
|
2022-03-27 23:19:38 +00:00
|
|
|
type ErrorMsg error
|
2022-03-23 15:40:31 +11:00
|
|
|
|
|
|
|
|
// Message indicates that a message should be shown to the user
|
2022-03-27 23:19:38 +00:00
|
|
|
type StatusMsg string
|
2022-03-23 15:40:31 +11:00
|
|
|
|
2022-09-29 22:10:18 +10:00
|
|
|
type WrappedStatusMsg struct {
|
|
|
|
|
Message StatusMsg
|
|
|
|
|
Next tea.Msg
|
|
|
|
|
}
|
|
|
|
|
|
2022-06-22 11:57:12 +10:00
|
|
|
// ModeMessage indicates that the mode should be changed to the following
|
|
|
|
|
type ModeMessage string
|
|
|
|
|
|
2022-03-23 15:40:31 +11:00
|
|
|
// PromptForInput indicates that the context is requesting a line of input
|
2022-03-27 23:19:38 +00:00
|
|
|
type PromptForInputMsg struct {
|
2023-01-10 22:27:13 +11:00
|
|
|
Prompt string
|
2023-01-26 21:46:31 +11:00
|
|
|
History services.HistoryProvider
|
2023-01-10 22:27:13 +11:00
|
|
|
OnDone func(value string) tea.Msg
|
|
|
|
|
OnCancel func() tea.Msg
|
2022-03-25 08:17:52 +11:00
|
|
|
}
|