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