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

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

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

    onRegisterItems: function (e) {
        
        e.registerItem(new PD.Web.UI.Controls.ContextMenuCommandItem({
            commandId: "pd/mail-queue/context-menu:mail-queue-item/resend"
        }));

        e.addSeparator();

        e.registerItem(new PD.Web.UI.Controls.ContextMenuCommandItem({
            commandId: "pd/mail-queue/context-menu:mail-queue-item/delete"
        }));
    
    },

    onOpen: function (e) {
        
        var grid = this.get_context().viewGrid;

        PD.context.get_default().get_commands().setState({
            "pd/mail-queue/context-menu": {
                mailQueueItems: grid.getSelections().toArray()
            }
        });

    }

});