// (C) Copyright 2020 Hewlett-Packard Enterprise Company, L.P.
define([ 'hp/services/REST','hp/model/DevelopmentSettings','jquery'],
function(REST, settings) {"use strict";

   var FactoryResetService = (function() {
  
        var disabled = false;
        function FactoryResetService() {

         
        /**
         * @constructor Singleton class containing service logic for the initial
         *              network settings page
         * @type {FactoryResetService}
         */
        
            this.startFactoryReset = function(option,  handlers) {                
                REST.deleteURI('/rest/appliance/?mode=' + option, handlers);
            };
            
         /**
          * Provides an ability to disable Factory Reset Action 
          */   
            this.setFactoryResetDisabled = function(state) {
                disabled=state;
            };
         /**
          * Returns current state of Factory Reset Action 
          * Takes into consideration Development Setting flag for an ease of
          * testing
          */ 
            this.getFactoryResetDisabled = function(state) {
                return (disabled || settings.disableFactoryReset());
                
            };
 
        }
  
        return new FactoryResetService();
    }());

    return FactoryResetService;
});