1package header23import (4 "strings"56 tea "charm.land/bubbletea/v2"7 "github.com/charmbracelet/soft-serve/pkg/ui/common"8)910// Header represents a header component.11type Header struct {12 common common.Common13 text string14}1516// New creates a new header component.17func New(c common.Common, text string) *Header {18 return &Header{19 common: c,20 text: text,21 }22}2324// SetSize implements common.Component.25func (h *Header) SetSize(width, height int) {26 h.common.SetSize(width, height)27}2829// Init implements tea.Model.30func (h *Header) Init() tea.Cmd {31 return nil32}3334// Update implements tea.Model.35func (h *Header) Update(_ tea.Msg) (common.Model, tea.Cmd) {36 return h, nil37}3839// View implements tea.Model.40func (h *Header) View() string {41 return h.common.Styles.ServerName.Render(strings.TrimSpace(h.text))42}