(()=>{"use strict";var e,r={1828(e,r,n){const t=window.wp.blocks,o=(window.wp.i18n,window.wp.blockEditor),i=window.wp.apiFetch;var a=n.n(i);window.wp.url;const l=window.React,s=window.ReactJSXRuntime,d=JSON.parse('{"UU":"rsvpmaker/rsvpdateblock"}');(0,t.registerBlockType)(d.UU,{edit:function(e){const{attributes:r,attributes:{alignment:n},context:{postId:t},setAttributes:i,isSelected:d}=e,[c,u]=(0,l.useState)(null);return console.log("post id "+t),(0,l.useEffect)(()=>{a()({path:"/rsvpmaker/v1/dateblock?post_id="+t+"&alignment="+n}).then(e=>{u(e.dateblock)})},[n]),(0,s.jsxs)("div",{...(0,o.useBlockProps)(),children:[(0,s.jsx)(o.BlockControls,{children:(0,s.jsx)(o.AlignmentToolbar,{value:n,onChange:e=>i({alignment:e})})}),c&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("div",{dangerouslySetInnerHTML:{__html:c}})}),!c&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("p",{children:"Loading ..."})})]})},save:function(){return null}})}},n={};function t(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return r[e](i,i.exports,t),i.exports}t.m=r,e=[],t.O=(r,n,o,i)=>{if(!n){var a=1/0;for(c=0;c<e.length;c++){for(var[n,o,i]=e[c],l=!0,s=0;s<n.length;s++)(!1&i||a>=i)&&Object.keys(t.O).every(e=>t.O[e](n[s]))?n.splice(s--,1):(l=!1,i<a&&(a=i));if(l){e.splice(c--,1);var d=o();void 0!==d&&(r=d)}}return r}i=i||0;for(var c=e.length;c>0&&e[c-1][2]>i;c--)e[c]=e[c-1];e[c]=[n,o,i]},t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.d=(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),(()=>{var e={7530:0,6046:0};t.O.j=r=>0===e[r];var r=(r,n)=>{var o,i,[a,l,s]=n,d=0;if(a.some(r=>0!==e[r])){for(o in l)t.o(l,o)&&(t.m[o]=l[o]);if(s)var c=s(t)}for(r&&r(n);d<a.length;d++)i=a[d],t.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return t.O(c)},n=globalThis.webpackChunkadmin=globalThis.webpackChunkadmin||[];n.forEach(r.bind(null,0)),n.push=r.bind(null,n.push.bind(n))})();var o=t.O(void 0,[6046],()=>t(1828));o=t.O(o)})();