(function(){const a=new VueJsAsyncComponentTemplateRepository(webContext+"/blog/jsp/js/vuejs/components/silverpeas-blog-templates.jsp");SpVue.component("silverpeas-blog-management",a.get("blog-management",{mixins:[VuejsApiMixin,VuejsI18nTemplateMixin],props:{wallpaper:{type:Object,"default":{}},stylesheet:{type:Object,"default":{}}},data:function(){return{personalizationPopin:undefined}},created:function(){this.extendApiWith({openPersonalization:this.openPersonalization})},methods:{openPersonalization:function(){this.personalizationPopin.open()}}}));SpVue.component("silverpeas-blog-personalization-popin",a.get("blog-personalization-popin",{mixins:[VuejsDefaultFormPanePopinApiMixin,VuejsI18nTemplateMixin],emits:["customize-change"],props:{wallpaper:{type:Object,"default":undefined},stylesheet:{type:Object,"default":undefined}},created:function(){this.extendApiWith({open:this.open})},methods:{open:function(){this.formApi.initFormData();this.$super(VuejsDefaultFormPanePopinApiMixin).open()},validate:function(b){return sp.ajaxRequest("Customize").byPostMethod().send(sp.form.toFormData(b)).then(function(){this.$emit("customize-change")}.bind(this))}}}));SpVue.component("silverpeas-blog-personalization-form",a.get("blog-personalization-form",{mixins:[VuejsFormApiMixin,VuejsI18nTemplateMixin],props:{wallpaper:{type:Object,required:true},stylesheet:{type:Object,required:true}},data:function(){return{wallpaperInput:undefined,wallpaperModel:{},stylesheetInput:undefined,stylesheetModel:{}}},created:function(){this.extendApiWith({initFormData:this.initFormData,validateForm:function(){return this.rootFormApi.errorMessage().none()},updateFormData:function(b){if(this.wallpaperModel.file){b[this.wallpaperModel.fileInputName]=this.wallpaperModel.file}else{if(this.wallpaperModel.deleteOriginal){b.removeWallPaperFile="yes"}}if(this.stylesheetModel.file){b[this.stylesheetModel.fileInputName]=this.stylesheetModel.file}else{if(this.stylesheetModel.deleteOriginal){b.removeStyleSheetFile="yes"}}}})},methods:{initFormData:function(){this.wallpaperInput.clear();this.wallpaperModel={};this.stylesheetInput.clear();this.stylesheetModel={}}}}))})();