package main

import (
	"html/template"
)

var uiTemplate *template.Template
var uiDBEditTemplate *template.Template
var uiAdminChatsTemplate *template.Template

func loadUITemplate(path string) error {
	tmpl, err := template.ParseFiles(path)
	if err != nil {
		return err
	}
	uiTemplate = tmpl
	return nil
}

func loadDBEditTemplate(path string) error {
	tmpl, err := template.ParseFiles(path)
	if err != nil {
		return err
	}
	uiDBEditTemplate = tmpl
	return nil
}

func loadAdminChatsTemplate(path string) error {
	tmpl, err := template.ParseFiles(path)
	if err != nil {
		return err
	}
	uiAdminChatsTemplate = tmpl
	return nil
}
