!function(e,t,a,r,l,n,i){let o=r.createElement,c=wp.i18n.__,s=e.registerBlockType,{InspectorControls:d}=l,{Fragment:p}=r,{PanelBody:u,PanelRow:b,SelectControl:v}=n,h=l.useBlockProps,{withSelect:w}=t,{subscribe:f}=t.subscribe;s("ics-calendar-pro/shortcode",{attributes:{calendar_id:{type:"integer"}},edit:function(e){let t=t=>{e.setAttributes({calendar_id:parseInt(t)})},{calendar_id:r}=e.attributes,l=a.compose(w(function(e){return{posts:e("core").getEntityRecords("postType","r34icspro_calendar")}}))(function(e){let a=[];return e.posts?(a.push({value:0,label:c("Select a Saved Calendar","ics-calendar-pro")}),e.posts.forEach(e=>{let t=e.title.rendered+" (ID: "+e.id+")";a.push({value:e.id,label:t})})):a.push({value:0,label:c("Loading...","ics-calendar-pro")}),o(v,{label:"",options:a,onChange:t,value:r})}),n=e=>o(i,{block:"ics-calendar-pro/shortcode",attributes:{calendar_id:e.attributes.calendar_id}});return o(p,{},o(d,{},o(u,{title:c("Saved Calendar","ics-calendar-pro"),initialOpen:!0},o(b,{},o(l,{calendar_id:r})))),o("div",h(),o(n,e)))},save:()=>null})}(window.wp.blocks,window.wp.data,window.wp.compose,window.wp.element,window.wp.blockEditor,window.wp.components,window.wp.serverSideRender);