// Code generated by qtc from "baseof.qtpl". DO NOT EDIT.
// See https://github.com/valyala/quicktemplate for details.

//line web/template/baseof.qtpl:1
package template

//line web/template/baseof.qtpl:1
import (
	"golang.org/x/text/language"
	"golang.org/x/text/message"

	"source.toby3d.me/toby3d/home/internal/domain"
)

//line web/template/baseof.qtpl:8
import (
	qtio422016 "io"

	qt422016 "github.com/valyala/quicktemplate"
)

//line web/template/baseof.qtpl:8
var (
	_ = qtio422016.Copy
	_ = qt422016.AcquireByteBuffer
)

//line web/template/baseof.qtpl:8
type Pager interface {
//line web/template/baseof.qtpl:8
	Body() string
//line web/template/baseof.qtpl:8
	StreamBody(qw422016 *qt422016.Writer)
//line web/template/baseof.qtpl:8
	WriteBody(qq422016 qtio422016.Writer)
//line web/template/baseof.qtpl:8
	T(format message.Reference, v ...any) string
//line web/template/baseof.qtpl:8
	StreamT(qw422016 *qt422016.Writer, format message.Reference, v ...any)
//line web/template/baseof.qtpl:8
	WriteT(qq422016 qtio422016.Writer, format message.Reference, v ...any)
//line web/template/baseof.qtpl:8
	Title() string
//line web/template/baseof.qtpl:8
	StreamTitle(qw422016 *qt422016.Writer)
//line web/template/baseof.qtpl:8
	WriteTitle(qq422016 qtio422016.Writer)
//line web/template/baseof.qtpl:8
	Lang() string
//line web/template/baseof.qtpl:8
	StreamLang(qw422016 *qt422016.Writer)
//line web/template/baseof.qtpl:8
	WriteLang(qq422016 qtio422016.Writer)
//line web/template/baseof.qtpl:8
	Dir() string
//line web/template/baseof.qtpl:8
	StreamDir(qw422016 *qt422016.Writer)
//line web/template/baseof.qtpl:8
	WriteDir(qq422016 qtio422016.Writer)
//line web/template/baseof.qtpl:8
}

//line web/template/baseof.qtpl:17
type BaseOf struct {
	printer *message.Printer
	site    *domain.Site
}

func NewBaseOf(site *domain.Site) BaseOf {
	return BaseOf{
		site:    site,
		printer: message.NewPrinter(language.Make(site.Language.Code())),
	}
}

//line web/template/baseof.qtpl:31
func (b BaseOf) StreamTitle(qw422016 *qt422016.Writer) {
//line web/template/baseof.qtpl:32
	qw422016.E().S(b.site.Title)
//line web/template/baseof.qtpl:33
}

//line web/template/baseof.qtpl:33
func (b BaseOf) WriteTitle(qq422016 qtio422016.Writer) {
//line web/template/baseof.qtpl:33
	qw422016 := qt422016.AcquireWriter(qq422016)
//line web/template/baseof.qtpl:33
	b.StreamTitle(qw422016)
//line web/template/baseof.qtpl:33
	qt422016.ReleaseWriter(qw422016)
//line web/template/baseof.qtpl:33
}

//line web/template/baseof.qtpl:33
func (b BaseOf) Title() string {
//line web/template/baseof.qtpl:33
	qb422016 := qt422016.AcquireByteBuffer()
//line web/template/baseof.qtpl:33
	b.WriteTitle(qb422016)
//line web/template/baseof.qtpl:33
	qs422016 := string(qb422016.B)
//line web/template/baseof.qtpl:33
	qt422016.ReleaseByteBuffer(qb422016)
//line web/template/baseof.qtpl:33
	return qs422016
//line web/template/baseof.qtpl:33
}

//line web/template/baseof.qtpl:35
func (b BaseOf) StreamT(qw422016 *qt422016.Writer, key message.Reference, a ...any) {
//line web/template/baseof.qtpl:36
	qw422016.E().S(b.printer.Sprintf(key, a...))
//line web/template/baseof.qtpl:37
}

//line web/template/baseof.qtpl:37
func (b BaseOf) WriteT(qq422016 qtio422016.Writer, key message.Reference, a ...any) {
//line web/template/baseof.qtpl:37
	qw422016 := qt422016.AcquireWriter(qq422016)
//line web/template/baseof.qtpl:37
	b.StreamT(qw422016, key, a...)
//line web/template/baseof.qtpl:37
	qt422016.ReleaseWriter(qw422016)
//line web/template/baseof.qtpl:37
}

//line web/template/baseof.qtpl:37
func (b BaseOf) T(key message.Reference, a ...any) string {
//line web/template/baseof.qtpl:37
	qb422016 := qt422016.AcquireByteBuffer()
//line web/template/baseof.qtpl:37
	b.WriteT(qb422016, key, a...)
//line web/template/baseof.qtpl:37
	qs422016 := string(qb422016.B)
//line web/template/baseof.qtpl:37
	qt422016.ReleaseByteBuffer(qb422016)
//line web/template/baseof.qtpl:37
	return qs422016
//line web/template/baseof.qtpl:37
}

//line web/template/baseof.qtpl:39
func (b BaseOf) StreamBody(qw422016 *qt422016.Writer) {
//line web/template/baseof.qtpl:39
}

//line web/template/baseof.qtpl:39
func (b BaseOf) WriteBody(qq422016 qtio422016.Writer) {
//line web/template/baseof.qtpl:39
	qw422016 := qt422016.AcquireWriter(qq422016)
//line web/template/baseof.qtpl:39
	b.StreamBody(qw422016)
//line web/template/baseof.qtpl:39
	qt422016.ReleaseWriter(qw422016)
//line web/template/baseof.qtpl:39
}

//line web/template/baseof.qtpl:39
func (b BaseOf) Body() string {
//line web/template/baseof.qtpl:39
	qb422016 := qt422016.AcquireByteBuffer()
//line web/template/baseof.qtpl:39
	b.WriteBody(qb422016)
//line web/template/baseof.qtpl:39
	qs422016 := string(qb422016.B)
//line web/template/baseof.qtpl:39
	qt422016.ReleaseByteBuffer(qb422016)
//line web/template/baseof.qtpl:39
	return qs422016
//line web/template/baseof.qtpl:39
}

//line web/template/baseof.qtpl:41
func (b BaseOf) StreamLang(qw422016 *qt422016.Writer) {
//line web/template/baseof.qtpl:42
	qw422016.E().S(b.site.Language.Lang())
//line web/template/baseof.qtpl:43
}

//line web/template/baseof.qtpl:43
func (b BaseOf) WriteLang(qq422016 qtio422016.Writer) {
//line web/template/baseof.qtpl:43
	qw422016 := qt422016.AcquireWriter(qq422016)
//line web/template/baseof.qtpl:43
	b.StreamLang(qw422016)
//line web/template/baseof.qtpl:43
	qt422016.ReleaseWriter(qw422016)
//line web/template/baseof.qtpl:43
}

//line web/template/baseof.qtpl:43
func (b BaseOf) Lang() string {
//line web/template/baseof.qtpl:43
	qb422016 := qt422016.AcquireByteBuffer()
//line web/template/baseof.qtpl:43
	b.WriteLang(qb422016)
//line web/template/baseof.qtpl:43
	qs422016 := string(qb422016.B)
//line web/template/baseof.qtpl:43
	qt422016.ReleaseByteBuffer(qb422016)
//line web/template/baseof.qtpl:43
	return qs422016
//line web/template/baseof.qtpl:43
}

//line web/template/baseof.qtpl:45
func (b BaseOf) StreamDir(qw422016 *qt422016.Writer) {
//line web/template/baseof.qtpl:46
	qw422016.E().S(b.site.Language.Dir().String())
//line web/template/baseof.qtpl:47
}

//line web/template/baseof.qtpl:47
func (b BaseOf) WriteDir(qq422016 qtio422016.Writer) {
//line web/template/baseof.qtpl:47
	qw422016 := qt422016.AcquireWriter(qq422016)
//line web/template/baseof.qtpl:47
	b.StreamDir(qw422016)
//line web/template/baseof.qtpl:47
	qt422016.ReleaseWriter(qw422016)
//line web/template/baseof.qtpl:47
}

//line web/template/baseof.qtpl:47
func (b BaseOf) Dir() string {
//line web/template/baseof.qtpl:47
	qb422016 := qt422016.AcquireByteBuffer()
//line web/template/baseof.qtpl:47
	b.WriteDir(qb422016)
//line web/template/baseof.qtpl:47
	qs422016 := string(qb422016.B)
//line web/template/baseof.qtpl:47
	qt422016.ReleaseByteBuffer(qb422016)
//line web/template/baseof.qtpl:47
	return qs422016
//line web/template/baseof.qtpl:47
}

//line web/template/baseof.qtpl:49
func StreamTemplate(qw422016 *qt422016.Writer, p Pager) {
//line web/template/baseof.qtpl:49
	qw422016.N().S(`<!DOCTYPE html><html lang="`)
//line web/template/baseof.qtpl:51
	p.StreamLang(qw422016)
//line web/template/baseof.qtpl:51
	qw422016.N().S(`" dir="`)
//line web/template/baseof.qtpl:51
	p.StreamDir(qw422016)
//line web/template/baseof.qtpl:51
	qw422016.N().S(`"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>`)
//line web/template/baseof.qtpl:56
	p.StreamTitle(qw422016)
//line web/template/baseof.qtpl:56
	qw422016.N().S(`</title></head><body>`)
//line web/template/baseof.qtpl:60
	p.StreamBody(qw422016)
//line web/template/baseof.qtpl:60
	qw422016.N().S(`</body></html>`)
//line web/template/baseof.qtpl:63
}

//line web/template/baseof.qtpl:63
func WriteTemplate(qq422016 qtio422016.Writer, p Pager) {
//line web/template/baseof.qtpl:63
	qw422016 := qt422016.AcquireWriter(qq422016)
//line web/template/baseof.qtpl:63
	StreamTemplate(qw422016, p)
//line web/template/baseof.qtpl:63
	qt422016.ReleaseWriter(qw422016)
//line web/template/baseof.qtpl:63
}

//line web/template/baseof.qtpl:63
func Template(p Pager) string {
//line web/template/baseof.qtpl:63
	qb422016 := qt422016.AcquireByteBuffer()
//line web/template/baseof.qtpl:63
	WriteTemplate(qb422016, p)
//line web/template/baseof.qtpl:63
	qs422016 := string(qb422016.B)
//line web/template/baseof.qtpl:63
	qt422016.ReleaseByteBuffer(qb422016)
//line web/template/baseof.qtpl:63
	return qs422016
//line web/template/baseof.qtpl:63
}
