package complete

import (
	
	
	
)

// PlainItem is a simple implementation of RawItem.
type PlainItem string

func ( PlainItem) () string { return string() }

func ( PlainItem) ( parse.PrimaryType) mode.CompletionItem {
	 := string()
	,  := parse.QuoteAs(, )
	return mode.CompletionItem{ToInsert: , ToShow: }
}

// noQuoteItem is a RawItem implementation that does not quote when cooked. This
// type is not exposed, since argument generators never need this.
type noQuoteItem string

func ( noQuoteItem) () string { return string() }

func ( noQuoteItem) (parse.PrimaryType) mode.CompletionItem {
	 := string()
	return mode.CompletionItem{ToInsert: , ToShow: }
}

// ComplexItem is an implementation of RawItem that offers customization options.
type ComplexItem struct {
	Stem         string   // Used in the code and the menu.
	CodeSuffix   string   // Appended to the code.
	Display      string   // How the item is displayed. If empty, defaults to Stem.
	DisplayStyle ui.Style // Use for displaying.
}

func ( ComplexItem) () string { return .Stem }

func ( ComplexItem) ( parse.PrimaryType) mode.CompletionItem {
	,  := parse.QuoteAs(.Stem, )
	 := .Display
	if  == "" {
		 = .Stem
	}
	return mode.CompletionItem{
		ToInsert:   + .CodeSuffix,
		ToShow:    ,
		ShowStyle: .DisplayStyle,
	}
}