2022-03-23 04:40:31 +00:00
|
|
|
package events
|
|
|
|
|
|
|
|
import (
|
2022-03-27 23:19:38 +00:00
|
|
|
tea "github.com/charmbracelet/bubbletea"
|
2023-04-16 22:31:03 +00:00
|
|
|
"github.com/lmika/dynamo-browse/internal/dynamo-browse/services"
|
2022-03-23 04:40:31 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// Error indicates that an error occurred
|
2022-03-27 23:19:38 +00:00
|
|
|
type ErrorMsg error
|
2022-03-23 04:40:31 +00: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 04:40:31 +00:00
|
|
|
|
2022-09-29 12:10:18 +00:00
|
|
|
type WrappedStatusMsg struct {
|
|
|
|
Message StatusMsg
|
|
|
|
Next tea.Msg
|
|
|
|
}
|
|
|
|
|
2022-06-22 01:57:12 +00:00
|
|
|
// ModeMessage indicates that the mode should be changed to the following
|
|
|
|
type ModeMessage string
|
|
|
|
|
2022-03-23 04:40:31 +00: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 11:27:13 +00:00
|
|
|
Prompt string
|
2023-01-26 10:46:31 +00:00
|
|
|
History services.HistoryProvider
|
2023-01-10 11:27:13 +00:00
|
|
|
OnDone func(value string) tea.Msg
|
|
|
|
OnCancel func() tea.Msg
|
2022-03-24 21:17:52 +00:00
|
|
|
}
|