/// class PD.Manage.Modules.Resources.ResourceCommand
// using PD.Commands.Command

PD.Manage.Modules.Resources.ResourceCommand =
PD.Commands.Command.extend({

    //===================================
    // PUBLIC METHODS
    //===================================

    setDefaults: function () {
        this.state("resources", null);
    },

    //===================================
    // PROTECTED METHODS
    //===================================

    getResources: function () {
    
        var result = [],
            resources = this.state("resources");
    
        if (_.isArray(resources)) {
            result = resources;
        }

        return result;

    },

    hasSelections: function () {
        return this.getResources().length > 0;
    },

    isMultiSelect: function () {
        return this.getResources().length > 1;
    }

});