﻿"use strict";

// Auth service to perform authentication
app.factory("utilsService", ["$rootScope", "$q", "$injector", "localStorageService", "ngAuthSettings", "$http", function ($rootScope, $q, $injector, localStorageService, ngAuthSettings, $http) {
    var $http;
    var utilsServiceFactory = {};

    var _getSecureApiBaseUri = function () {
		// We're using a function here to make sure the app startup initializes, if we use a scope var we may not have the initialized value yet
    	return ($rootScope.secureApiBaseUri);
    };
  
    var _remoteFileGeoBlocked = function (url) {
        $http = $http || $injector.get("$http");
        var data = { Url: url };
        return $http.post("/api/utils/remoteFileGeoBlocked/1", data);
    };

    utilsServiceFactory.remoteFileGeoBlocked = _remoteFileGeoBlocked;

    return utilsServiceFactory;
}]);