package views
import "git.32bit.cafe/32bitcafe/guestbook/internal/models"
import "strconv"
import "fmt"
import "strings"
type CommonData struct {
	CurrentYear      int
	Flash            string
	IsAuthenticated  bool
	CSRFToken        string
	CurrentUser      *models.User
	IsHtmx           bool
	RootUrl          string
	LocalAuthEnabled bool
	OIDCEnabled      bool
}
func shortIdToSlug(shortId uint64) string {
	return strconv.FormatUint(shortId, 36)
}
func slugToShortId(slug string) uint64 {
	id, _ := strconv.ParseUint(slug, 36, 64)
	return id
}
func externalUrl(url string) string {
	if !strings.HasPrefix(url, "http") {
		return "http://" + url
	}
	return url
}
templ commonHeader() {
	webweav.ing