!function(){var e=wp.element.createElement,t=wp.components.SelectControl,n=EventFeedForEventbriteBlock.feeds,l=[];for(var r in n)n.hasOwnProperty(r)&&l.push({label:n[r].name+" (ID: "+n[r].ID+")",value:n[r].ID});var c=e("svg",{width:24,height:24,viewBox:"0 0 24 24",className:"dashicon"},e("path",{fill:"currentColor",d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7h15v12zM9 10H7v2h2v-2zm0 4H7v2h2v-2zm4-4h-2v2h2v-2zm4 0h-2v2h2v-2zm-4 4h-2v2h2v-2zm4 0h-2v2h2v-2z"})),i=e("svg",{width:24,height:24,viewBox:"0 0 24 24",className:"dashicon"},e("path",{fill:"currentColor",d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"})),o={title:EventFeedForEventbriteBlock.block_name,description:EventFeedForEventbriteBlock.block_description,icon:c,category:"widgets",attributes:{feedId:{type:"string",default:n[0].ID}},edit:function(e){return wp.element.createElement("div",{className:"event-feed-for-eventbrite-block-container"},[wp.element.createElement("div",{className:"event-feed-for-eventbrite-block-heading"},[c,wp.element.createElement("div",null,EventFeedForEventbriteBlock.block_name)]),wp.element.createElement(t,{label:EventFeedForEventbriteBlock.select_label,value:e.attributes.feedId,className:"event-feed-for-eventbrite-block-feed-select",options:l,onChange:function(t){e.setAttributes({feedId:t})}},null),wp.element.createElement("div",{className:"event-feed-for-eventbrite-block-p"},wp.element.createElement("a",{className:"event-feed-for-eventbrite-block-edit-link",href:(n=window.location.href,r=n.indexOf("/wp-admin"),n.substring(0,r)+"/wp-admin/post.php?post="+e.attributes.feedId+"&action=edit"),target:"_blank"},[i,wp.element.createElement("span",null,EventFeedForEventbriteBlock.edit_link_text)]))]);var n,r},save:function(e){return wp.element.createElement("div",null,'[event-feed id="'+e.attributes.feedId+'"]')}};wp.blocks.registerBlockType("event-feed-for-eventbrite/block",o)}();