/// class PD.Web.UI.Controls.TreeViewModule

PD.Web.UI.Controls.TreeViewModule =
Class.extend({

    //===================================
    // FIELDS
    //===================================

    _tree: null,

    //===================================
    // CONSTRUCTOR
    //===================================

    init: function (options) {
    },

    //===================================
    // PROPERTIES
    //===================================

    get_options: function() {
        return this.get_tree().get_options();
    },

    get_tree: function () {
        return this._tree;
    },

    get_kendo: function () {
        return this.get_tree().get_kendo();
    },

    get_id: function () {
        return this._id;
    },

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

    getOptionSettings: function () {
        return null;
    },

    activate: function (tree) {
        this._tree = tree;
    },

    start: function () {
        this._registerEventHandlers();
    },

    ready: function () {
        // do nothing on purpose
    },

    stop: function () {
        // do nothing on purpose
    },

    addTreeViewMethod: function (name, fn) {
        this.get_tree()[name] = $.proxy(fn, this);
    },

    meetsLoadConditions: function () {
        return true;
    },

    getOption: function (path, defaultValue) {
        return this.get_tree().getOption(path, defaultValue);
    },

    onError: function () {
        // do nothing on purpose
    },

    //===================================
    // PRIVATE METHODS
    //===================================

    _registerEventHandlers: function () {
        //do nothing on purpose
    }

});