/// class PD.Web.UI.Controls.ContextMenuItemTemplate

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

    apply: function (e) {

        var frame = [""];

        if (e.separator) {

            frame = [
                "<div style='height:1px;border-width:0;border-top:1px solid #CCCCCC;margin-width:0 0 0 30px;position:absolute;top:0;left:36px;right:0;'>&nbsp;</div>"
            ];

        }
        else {

            frame = [
                "<span data-id='" + e.id + "' class='-pd-menu-item'>",
                    "<span class='-pd-menu-icon'>",
                        e.imageUrl ? "<img src='" + e.imageUrl + "'>" : "",
                    "</span>",
                    "<span class='-pd-menu-text'>",
                        e.text,
                    "</span>",
                "</span>"
            ];

        }

        return frame.join("");

    }

});