!function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=(r.n(n),r(2)),l=(r.n(o),function(){function e(e,t){var r=[],n=!0,o=!1,l=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,l=e}finally{try{!n&&a.return&&a.return()}finally{if(o)throw l}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()),i=wp.i18n.__,a=wp.blocks.registerBlockType,u=wp.components,s=u.SelectControl,c=u.PanelRow,p=wp.editor.InspectorControls;a("rttpg/post-grid",{title:i("The Post Grid","the-post-grid"),icon:"grid-view",category:"common",keywords:[i("Post Grid","the-post-grid"),i("The Post Grid","the-post-grid"),i("the-post-grid","the-post-grid")],attributes:{gridId:{type:"number",default:0}},edit:function(e){var t=e.attributes.gridId,r=e.setAttributes,n="",o=[{value:0,label:i("Select one","the-post-grid")}];if(rttpgGB.short_codes){var a=!0,u=!1,d=void 0;try{for(var f,m=Object.entries(rttpgGB.short_codes)[Symbol.iterator]();!(a=(f=m.next()).done);a=!0){var h=f.value,g=l(h,2),b=g[0],w=g[1];o.push({value:b,label:w}),t&&Number(b)===t&&(n=w)}}catch(e){u=!0,d=e}finally{try{!a&&m.return&&m.return()}finally{if(u)throw d}}}return[wp.element.createElement(p,null,"This text will show when the box is selected",wp.element.createElement(c,null,wp.element.createElement(s,{label:i("Select a grid:"),options:o,value:t,onChange:function(e){return r({gridId:Number(e)})}}))),wp.element.createElement("div",{className:e.className},t?wp.element.createElement("div",null,wp.element.createElement("span",null,wp.element.createElement("img",{src:rttpgGB.icon}))," ",wp.element.createElement("span",null,i("The Post Grid","the-post-grid")," ( ",n," )")):wp.element.createElement("p",null,"Please select a shortcode from block settings"))]},save:function(e){e.attributes.gridId;return null}})},function(e,t){},function(e,t){}]);