!function(e){var t={};function r(l){if(t[l])return t[l].exports;var n=t[l]={i:l,l:!1,exports:{}};return e[l].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,l){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var l=Object.create(null);if(r.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(l,n,function(t){return e[t]}.bind(null,n));return l},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t,r){"use strict";r.r(t);var l=r(0),n=r(1),a=wp.i18n.__;Object(n.registerBlockType)("maxgalleria/gallery",{title:a("MaxGalleria Gallery"),icon:"format-gallery",category:"embed",keywords:["gallery","maxgalleria"],attributes:{galleryID:{type:"string",selector:"select",attribute:"value",default:""}},edit:function(e){var t,r=e.attributes,n=e.setAttributes,i=e.className;e.isSelected;return Object(l.createElement)("div",{className:i},Object(l.createElement)("div",null,a("MaxGalleria Gallery","maxgalleria")),0==mg_block_info.galleries.length?Object(l.createElement)("div",null,a("No galleries found","maxgalleria")):Object(l.createElement)("select",{onChange:function(){return e=event.target.value,console.log("newGalleryID",e),void n({galleryID:e});var e}},Object(l.createElement)("option",{value:"",disabled:!0},a("Select a gallery","maxgalleria")),(t=r.galleryID,mg_block_info.galleries.map((function(e,r){return e.id===t?Object(l.createElement)("option",{key:r,value:e.id,selected:"selected"},e.name):Object(l.createElement)("option",{key:r,value:e.id},e.name)})))))},save:function(e){var t=e.attributes,r=e.className;return Object(l.createElement)("div",{className:r},'[maxgallery id="'+t.galleryID+'"]')}})}]);