1package common
2
3import (
4 "github.com/charmbracelet/bubbles/help"
5 tea "github.com/charmbracelet/bubbletea"
6)
7
8// Component represents a Bubble Tea model that implements a SetSize function.
9type Component interface {
10 tea.Model
11 help.KeyMap
12 SetSize(width, height int)
13}
14
15// TabComponenet represents a model that is mounted to a tab.
16// TODO: find a better name
17type TabComponent interface {
18 Component
19
20 // StatusBarValue returns the status bar value component.
21 StatusBarValue() string
22
23 // StatusBarInfo returns the status bar info component.
24 StatusBarInfo() string
25
26 // SpinnerID returns the ID of the spinner.
27 SpinnerID() int
28
29 // TabName returns the name of the tab.
30 TabName() string
31}