namespace SelectPdf.Samples
{
    // Replaces Startup.ServerPath / Startup.WebRootPath from the MVC sample.
    // Populated once at startup so the page components can read on-disk paths
    // (e.g., wwwroot\files\doc1.pdf) without injecting IWebHostEnvironment everywhere.
    public static class ServerInfo
    {
        public static string ServerPath { get; set; } = string.Empty;
        public static string WebRootPath { get; set; } = string.Empty;

        // Public marketing site the chrome (nav menu, logo, footer) links at.
        // Set once at startup (see Program.cs): the staging mirror is
        // selectpdf.net; dev and production use selectpdf.com. Always stored
        // without a trailing slash so callers can append "/path".
        public static string MarketingBaseUrl { get; set; } = "https://selectpdf.com";

        // Host-only form of MarketingBaseUrl (no scheme, no trailing slash) for
        // display text such as the footer "selectpdf.com" / "selectpdf.net" label.
        public static string MarketingHost =>
            MarketingBaseUrl.Replace("https://", string.Empty)
                            .Replace("http://", string.Empty)
                            .TrimEnd('/');
    }
}
