// This file handles any configuration parameters
// These are static, it used to be generated by variable_injector, but to clean up we'll remove that process.


public struct EnvironmentVariables {
    public struct Oauth {
        public struct Google {
            static public private(set) var consumerKey = "$(GOOGLE_CONSUMER_KEY)"
            static public private(set) var consumerSecret = "$(GOOGLE_CONSUMER_SECRET)"
            static public private(set) var callbackURL = "$(GOOGLE_REDIRECT_URL)"
         }

        public struct Github {
            static public private(set) var consumerKey = "$(GITHUB_CONSUMER_KEY)"
            static public private(set) var consumerSecret = "$(GITHUB_CONSUMER_SECRET)"
            static public private(set) var callbackURL = "$(GITHUB_REDIRECT_URL)"
        }

        public struct Facebook {
            static public private(set) var appID = "$(FACEBOOK_APP_ID)"
        }
    }

    public struct GoogleCloudPlatform {
        public struct Authentication {
            static public private(set) var privateKey = "$(GCP_SERVICE_ACCOUNT_PRIVATE_KEY)"
            static public private(set) var clientEmail = "$(GCP_SERVICE_ACCOUNT_CLIENT_EMAIL)"
            static public private(set) var tokenURI = "$(GCP_SERVICE_ACCOUNT_TOKEN_URI)"
        }
    }

    public struct BrowsingTree {
        static public private(set) var accessToken = "$(BROWSING_TREE_ACCESS_TOKEN)"
        static public private(set) var url = "$(BROWSING_TREE_URL)"
        static public private(set) var apiSyncEnabled = NSString("$(BROWSING_TREE_API_SYNC_ENABLED)").boolValue
    }

    public struct Clustering {
        static public private(set) var tabColoring = NSString("$(TAB_COLORING)").boolValue
    }

    public struct PublicAPI {
        static public private(set) var embed = "$(PUBLIC_API_EMBED_URL)"
        static public private(set) var publishServer = "$(PUBLIC_API_PUBLISH_URL)"
    }

    public struct Account {
        static public private(set) var testPassword = "$(TEST_ACCOUNT_PASSWORD)"
        static public private(set) var testEmail = "$(TEST_ACCOUNT_EMAIL)"
    }

    public struct MockHttpServer {
        static public private(set) var port = NSString("$(MOCK_HTTP_PORT)").integerValue
    }

    static public private(set) var env = "debug" //"$(ENV)"
    static public private(set) var autoUpdate = false //NSString("$(AUTOMATIC_UPDATE)").boolValue
    static public private(set) var networkStubs = NSString("$(NETWORK_STUBS)").boolValue
    static public private(set) var networkEnabled = NSString("$(NETWORK_ENABLED)").boolValue
    static public private(set) var beamObjectSendPrivateKey = NSString("$(BEAM_OBJECT_SEND_PRIVATE_KEY)").boolValue
    static public private(set) var hideCategories = "$(HIDE_CATEGORIES)".split(separator: " ").compactMap {
        LogCategory(rawValue: String($0))
    }

    static public private(set) var webOnboardingURL = "https://welcometour.beamapp.co" // $(WEB_ONBOARDING_URL)"

    #if BEAM_BETA
    static public private(set) var branchType = "beta"
    #elseif BEAM_PUBLIC
    static public private(set) var branchType = "public"
    #else
    static public private(set) var branchType = "develop"
    #endif

}
