/// class PD.Manage.Modules.RecycleBinContextMenu
// using PD.Web.UI.Controls.ContextMenuSegment

PD.Manage.Modules.RecycleBinContextMenu =
PD.Web.UI.Controls.ContextMenuSegment.extend({

    //===================================
    // EVENT HANDLERS
    //===================================

    onRegisterItems: function (e) {

        e.registerItem(new PD.Web.UI.Controls.ContextMenuCommandItem({
            commandId: "pd/recycle-bin/context-menu:recycle-bin/restore"
        }));

        e.addSeparator();

        e.registerItem(new PD.Web.UI.Controls.ContextMenuCommandItem({
            commandId: "pd/recycle-bin/context-menu:recycle-bin/delete"
        }));

    },

    onOpen: function (e) {

        var grid = this.get_context().viewGrid;

        PD.context.get_default().get_commands().setState({
            "pd/recycle-bin/context-menu": {
                recycleBinItems: grid.getSelections().toArray()
            }
        });

    }

});