2024-06-10 12:32:45 +00:00
|
|
|
package searchui
|
|
|
|
|
2024-06-10 13:15:10 +00:00
|
|
|
import (
|
|
|
|
"sevenkeys/figlet"
|
|
|
|
"sevenkeys/logic"
|
|
|
|
|
|
|
|
tea "github.com/charmbracelet/bubbletea"
|
|
|
|
)
|
2024-06-10 12:32:45 +00:00
|
|
|
|
|
|
|
type Model struct {
|
2024-06-10 13:15:10 +00:00
|
|
|
searchOptions logic.SearchOptions
|
|
|
|
selectedCardPrintingId int
|
|
|
|
selectedCardPrintingSearch string
|
2024-06-10 12:32:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func NewSearchModel() Model {
|
|
|
|
return Model{}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m Model) Init() tea.Cmd {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
2024-06-10 13:15:10 +00:00
|
|
|
/*
|
|
|
|
var cmd tea.Cmd
|
|
|
|
|
|
|
|
switch msg := msg.(type) {
|
|
|
|
case cardPrintingsLoadedMsg:
|
|
|
|
m.cardPrintingsLoaded = true
|
|
|
|
break
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
|
|
|
|
return m, tea.Quit
|
2024-06-10 12:32:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m Model) View() string {
|
2024-06-10 13:15:10 +00:00
|
|
|
var ui string
|
|
|
|
|
|
|
|
ui += figlet.SprintMsgSlant("Insert Cards")
|
|
|
|
|
|
|
|
return ui
|
2024-06-10 12:32:45 +00:00
|
|
|
}
|