package template

type BlockType string

const (
	DataBlock     BlockType = "data"     // content between lines "{" and "}"
	MatchingBlock BlockType = "matching" // everything outside data blocks
)

type BlockField struct {
	Path        string
	PathAliases []string
	CodecType   CodecType
	Value       any
	Hidden      bool
}

type Block struct {
	Type         BlockType
	Path         string
	PathAliases  []string
	Codec        CodecType
	ListTemplate string
	Fields       []BlockField
	Optional     bool
	Value        any
	content      Slice
}

func (b Block) GetContent() string {
	return b.content.String()
}
