package ui

import (
	"fyne.io/fyne/v2"
	"fyne.io/fyne/v2/container"
	"fyne.io/fyne/v2/layout"
	"fyne.io/fyne/v2/widget"
)

type statusBar struct {
	msgLabel *widget.Label
	widget   *fyne.Container
}

func newStatusBar() *statusBar {
	var sb statusBar
	sb.msgLabel = widget.NewLabel("")
	sb.widget = container.New(layout.NewHBoxLayout(),
		sb.msgLabel,
		layout.NewSpacer())
	return &sb
}

func (sb *statusBar) setMessage(msg string) {
	sb.msgLabel.SetText(msg)
}
