package domain

import (
	"net/url"
	"path"
	"time"
)

type Site struct {
	DefaultLanguage Language
	Language        Language
	Languages       []Language
	BaseURL         *url.URL
	Params          map[string]any
	TimeZone        *time.Location
	File            File
	Title           string
	Resources       Resources
}

func (s Site) LanguagePrefix() string {
	if s.Language != LanguageUnd {
		return path.Join("/", s.Language.lang, "/")
	}

	return ""
}

func (s Site) IsMultiLingual() bool {
	return 1 < len(s.Languages)
}
