package wireguard import ( "time" tea "github.com/charmbracelet/bubbletea" ) // StatusTickMsg is sent when it's time to refresh the status type StatusTickMsg struct{} // RefreshStatusMsg is sent when manual refresh is triggered type RefreshStatusMsg struct{} // Tick returns a tea.Cmd that will send StatusTickMsg at the specified interval func Tick(interval int) tea.Cmd { return tea.Tick(time.Duration(interval)*time.Second, func(t time.Time) tea.Msg { return StatusTickMsg{} }) } // ManualRefresh returns a tea.Cmd to trigger immediate status refresh func ManualRefresh() tea.Cmd { return func() tea.Msg { return RefreshStatusMsg{} } }