func (m Model) FilteringEnabled() bool {
	return m.filteringEnabled
}
FilteringEnabled returns whether or not filtering is enabled.
package list
import (
	"fmt"
	"io"
	"sort"
	"strings"
	"time"
	"github.com/charmbracelet/bubbles/help"
	"github.com/charmbracelet/bubbles/key"
	"github.com/charmbracelet/bubbles/paginator"
	"github.com/charmbracelet/bubbles/spinner"
	"github.com/charmbracelet/bubbles/textinput"
	tea "github.com/charmbracelet/bubbletea"
	"github.com/charmbracelet/lipgloss"
	"github.com/muesli/reflow/ansi"
	"github.com/muesli/reflow/truncate"
	"github.com/sahilm/fuzzy"
)
type Item interface {
	FilterValue() string
}
type ItemDelegate interface {
	Render(w io.Writer, m Model, index int, item Item)
	Height() int
	Spacing() int
	Update(msg tea.Msg, m *Model) tea.Cmd
}
type filteredItem struct {
	item    Item   
	matches []int  
}
type filteredItems []filteredItem
func (f filteredItems) items() []Item {
	agg := make([]Item, len(f))
	for i, v := range f {
		agg[i] = v.item
	}
	return agg
}
func (f filteredItems) matches() [][]int {
	agg := make([][]int, len(f))
	for i, v := range f {
		agg[i] = v.matches
	}
	return agg
}
type filterMatchesMsg []filteredItem
type statusMessageTimeoutMsg struct{}
type FilterState int
const (
	Unfiltered    FilterState = iota  
	Filtering                         
	FilterApplied                     
)
func (f FilterState) String() string {
	return [...]string{
		"unfiltered",
		"filtering",
		"filter applied",
	}[f]
}
type Model struct {
	showTitle        bool
	showFilter       bool
	showStatusBar    bool
	showPagination   bool
	showHelp         bool
	filteringEnabled bool
	Title  string
	Styles Styles
	KeyMap KeyMap
	AdditionalShortHelpKeys func() []key.Binding
	AdditionalFullHelpKeys  func() []key.Binding
	spinner     spinner.Model
	showSpinner bool
	width       int
	height      int
	Paginator   paginator.Model
	cursor      int
	Help        help.Model
	FilterInput textinput.Model
	filterState FilterState
	StatusMessageLifetime time.Duration
	statusMessage      string
	statusMessageTimer *time.Timer
	items []Item
	filteredItems filteredItems
	delegate ItemDelegate
}
func NewModel(items []Item, delegate ItemDelegate, width, height int) Model {
	styles := DefaultStyles()
	sp := spinner.NewModel()
	sp.Spinner = spinner.Line
	sp.Style = styles.Spinner
	filterInput := textinput.NewModel()
	filterInput.Prompt = "Filter: "
	filterInput.PromptStyle = styles.FilterPrompt
	filterInput.CursorStyle = styles.FilterCursor
	filterInput.CharLimit = 64
	filterInput.Focus()
	p := paginator.NewModel()
	p.Type = paginator.Dots
	p.ActiveDot = styles.ActivePaginationDot.String()
	p.InactiveDot = styles.InactivePaginationDot.String()
	m := Model{
		showTitle:             true,
		showFilter:            true,
		showStatusBar:         true,
		showPagination:        true,
		showHelp:              true,
		filteringEnabled:      true,
		KeyMap:                DefaultKeyMap(),
		Styles:                styles,
		Title:                 "List",
		FilterInput:           filterInput,
		StatusMessageLifetime: time.Second,
		width:     width,
		height:    height,
		delegate:  delegate,
		items:     items,
		Paginator: p,
		spinner:   sp,
		Help:      help.NewModel(),
	}
	m.updatePagination()
	m.updateKeybindings()
	return m
}
func (m *Model) SetFilteringEnabled(v bool) {
	m.filteringEnabled = v
	if !v {
		m.resetFiltering()
	}
	m.updateKeybindings()
}