package main

// Config holds all document metadata from the Markdown YAML front matter.
// It drives the title page, abbreviation list, and glossary.
//
// Example front matter:
//
//	student:
//	  name: "Max Mustermann"
//	  profession: "Fachinformatiker Fachrichtung Anwendungsentwicklung"
//	  company: "Musterfirma GmbH"
//	  supervisor: "Sabine Supervisor"
//	project:
//	  title: "Thema der Projektarbeit"
//	  period: "Sommer 2026"
//	abbreviations:
//	  - abbr: "API"
//	    meaning: "Application Programming Interface"
//	glossary:
//	  - term: "Agile"
//	    definition: "Iteratives Vorgehensmodell der Softwareentwicklung"
type Config struct {
	Student struct {
		Name       string `yaml:"name"`
		Profession string `yaml:"profession"`
		Company    string `yaml:"company"`
		Supervisor string `yaml:"supervisor"`
	} `yaml:"student"`

	Project struct {
		Title    string `yaml:"title"`
		Period   string `yaml:"period"`
		Subtitle string `yaml:"subtitle"`
	} `yaml:"project"`

	// Abbreviations populates the list of abbreviations placed after the TOC.
	Abbreviations []Abbreviation `yaml:"abbreviations"`

	// Glossary populates the Glossar section placed before the declaration page.
	Glossary []GlossaryEntry `yaml:"glossary"`
}

// Abbreviation is one entry in the list of abbreviations.
type Abbreviation struct {
	Abbr    string `yaml:"abbr"`
	Meaning string `yaml:"meaning"`
}

// GlossaryEntry is one entry in the Glossar section.
type GlossaryEntry struct {
	Term       string `yaml:"term"`
	Definition string `yaml:"definition"`
}
