package admin

import (
	"html/template"
	"path/filepath"
)

var pages = map[string]*template.Template{
    "index": template.Must(template.ParseFiles(
        filepath.Join("admin", "views", "layout.html"),
        filepath.Join("views", "prideflag.html"),
        filepath.Join("admin", "components", "release", "release-list-item.html"),
        filepath.Join("admin", "views", "index.html"),
    )),

    "login": template.Must(template.ParseFiles(
        filepath.Join("admin", "views", "layout.html"),
        filepath.Join("views", "prideflag.html"),
        filepath.Join("admin", "views", "login.html"),
    )),
    "logout": template.Must(template.ParseFiles(
        filepath.Join("admin", "views", "layout.html"),
        filepath.Join("views", "prideflag.html"),
        filepath.Join("admin", "views", "logout.html"),
    )),

    "release": template.Must(template.ParseFiles(
        filepath.Join("admin", "views", "layout.html"),
        filepath.Join("views", "prideflag.html"),
        filepath.Join("admin", "views", "edit-release.html"),
    )),
    "artist": template.Must(template.ParseFiles(
        filepath.Join("admin", "views", "layout.html"),
        filepath.Join("views", "prideflag.html"),
        filepath.Join("admin", "views", "edit-artist.html"),
    )),
    "track": template.Must(template.ParseFiles(
        filepath.Join("admin", "views", "layout.html"),
        filepath.Join("views", "prideflag.html"),
        filepath.Join("admin", "components", "release", "release-list-item.html"),
        filepath.Join("admin", "views", "edit-track.html"),
    )),
}

var components = map[string]*template.Template{
    "editcredits": template.Must(template.ParseFiles(filepath.Join("admin", "components", "credits", "editcredits.html"))),
    "addcredit": template.Must(template.ParseFiles(filepath.Join("admin", "components", "credits", "addcredit.html"))),
    "newcredit": template.Must(template.ParseFiles(filepath.Join("admin", "components", "credits", "newcredit.html"))),

    "editlinks": template.Must(template.ParseFiles(filepath.Join("admin", "components", "links", "editlinks.html"))),

    "edittracks": template.Must(template.ParseFiles(filepath.Join("admin", "components", "tracks", "edittracks.html"))),
    "addtrack": template.Must(template.ParseFiles(filepath.Join("admin", "components", "tracks", "addtrack.html"))),
    "newtrack": template.Must(template.ParseFiles(filepath.Join("admin", "components", "tracks", "newtrack.html"))),
}
