YUI.add("moodle-block_xp-notification",function(n,e){var s="block_xp",d={BADGE:"level-badge",CONTENT:"level-message-content",HEADLINE:"level-headline",NAME:"level-name",PREFIX:"block_xp-notification",WRAP:"wrapper"},t=function(){t.superclass.constructor.apply(this,arguments)};n.namespace("M.block_xp").Notification=n.extend(t,M.core.dialogue,{initializer:function(){this.display()},close:function(){this.hide()},display:function(){var e,t,i,a,o,l;l=n.Handlebars.compile('<div class="{{CSS.WRAP}}"> <div class="{{CSS.HEADLINE}}">  {{headline}} </div> <div class="{{CSS.BADGE}}">  {{{badge}}} </div> {{#if hasName}} <div class="{{CSS.NAME}}">  {{name}} </div> {{/if}} <div class="{{CSS.CONTENT}}">  {{{message}}} </div></div>'),this.getStdModNode(n.WidgetStdMod.HEADER).prepend(n.Node.create("<h1>"+this.get("title")+"</h1>")),i=(o=this.get("name"))&&o.length,a=M.util.get_string("youreachedlevela","block_xp",this.get("level")),i&&(a=M.util.get_string("youreachedlevel","block_xp")),t=n.Node.create(l({badge:this.get("badge"),CSS:d,hasName:i,headline:a,message:this.get("message"),name:o})),this.setStdModContent(n.WidgetStdMod.BODY,t,n.WidgetStdMod.REPLACE),e=n.Handlebars.compile('<button class="btn btn-default">{{close}}</button>'),(t=n.Node.create(e({close:M.util.get_string("coolthanks",s)}))).on("click",this.close,this),this.setStdModContent(n.WidgetStdMod.FOOTER,t,n.WidgetStdMod.REPLACE),this.get("boundingBox").one(".moodle-dialogue-wrap").addClass("moodle-dialogue-content"),this.show()}},{NAME:e,CSS_PREFIX:d.PREFIX,ATTRS:{badge:{validator:n.Lang.isString,value:""},level:{validator:n.Lang.isNumber,value:0},message:{validator:n.Lang.isString,value:""},name:{validator:n.Lang.isString,value:""}}}),n.Base.modifyAttrs(n.namespace("M.block_xp.Notification"),{extraClasses:{value:[s]},modal:{value:!0},render:{value:!0},title:{valueFn:function(){return M.util.get_string("congratulationsyouleveledup",s)}},visible:{value:!1}}),n.namespace("M.block_xp.Notification").init=function(e){return new t(e)}},"@VERSION@",{requires:["base","node","handlebars","button-plugin","moodle-core-notification-dialogue"]});