package elinps

import (
	"html/template"
	"net/http"
)

type TemplateRenderer struct {
	t *template.Template
}

func NewTemplateRenderer(t *template.Template) *TemplateRenderer { return &TemplateRenderer{t: t} }

func (r *TemplateRenderer) Render(w http.ResponseWriter, name string, data any) {
	_ = r.t.ExecuteTemplate(w, name, data)
}

type FormPageData struct {
	Produto string
	ID      string
	Reg     Registro
}
