(()=>{"use strict";var e,r={4565(){const e=window.wp.blocks,r=window.wp.blockEditor,o=(window.wp.apiFetch,window.ReactJSXRuntime),{__}=wp.i18n,{registerBlockType:a}=wp.blocks,{InnerBlocks:t,InspectorControls:n,MediaUpload:l,MediaUploadCheck:s}=wp.blockEditor,{Component:i,Fragment:c,useState:p,useEffect:d,RawHTML:g}=wp.element,{Panel:u,PanelBody:m,SelectControl:h,TextControl:k,ColorPicker:b,ColorPalette:v,Button:x,ResponsiveWrapper:f}=wp.components,{useBlockProps:C,InnerBlocks:y}=wp.blockEditor,w=JSON.parse('{"UU":"rsvpmaker/emailcontent"}');(0,e.registerBlockType)(w.UU,{edit:function(e){const a=[["core/paragraph",{placeholder:__("Email content","rsvpmaker")}]],{attributes:l,className:s,setAttributes:i,isSelected:c,attributes:{backgroundColor:p,color:d,padding:g,marginLeft:u,marginRight:h,maxWidth:x,border:f,minHeight:C}}=e,y={backgroundColor:l.backgroundColor,color:l.color,padding:l.padding,marginLeft:l.marginLeft,marginRight:l.marginRight,maxWidth:l.maxWidth,border:l.border,minHeight:"20px"},w=(0,r.useBlockProps)({className:s,style:y}),j=wp.data.select("core/block-editor").getSettings().colors;return(0,o.jsxs)("div",{...w,children:[(0,o.jsx)(n,{children:(0,o.jsxs)(m,{title:__("Style","rsvpmaker"),children:[(0,o.jsx)("h3",{children:"Background Color"}),(0,o.jsx)(v,{colors:j,value:p,onChange:e=>i({backgroundColor:e})}),(0,o.jsx)(b,{label:"Background Color",color:p,onChange:e=>{i({backgroundColor:e})},enableAlpha:!0}),(0,o.jsx)("h3",{children:"Text Color"}),(0,o.jsx)(v,{colors:j,value:d,onChange:e=>i({color:e})}),(0,o.jsx)(b,{color:d,onChange:e=>{i({color:e})},enableAlpha:!0}),(0,o.jsx)(k,{label:"Border",value:f,onChange:e=>{i({border:e})}}),(0,o.jsx)(k,{label:"Margin Left",value:u,onChange:e=>{i({marginLeft:e})}}),(0,o.jsx)(k,{label:"Margin Right",value:h,onChange:e=>{i({marginRight:e})}}),(0,o.jsx)(k,{label:"Max Width",value:x,onChange:e=>{i({maxWidth:e})}}),(0,o.jsx)(k,{label:"Padding",value:g,onChange:e=>{i({padding:e})}})]})},"emailcontentinspector"),(0,o.jsx)(t,{template:a})]})},save:function(e){const{attributes:r,className:a}=e,t={backgroundColor:r.backgroundColor,color:r.color,padding:r.padding,marginLeft:r.marginLeft,marginRight:r.marginRight,maxWidth:r.maxWidth,border:r.border,minHeight:"20px",marginBottom:"5px"},n=C.save({className:a,style:t});return(0,o.jsx)("div",{...n,children:(0,o.jsx)(y.Content,{})})},transforms:{to:[{type:"block",blocks:["core/query"],transform:r=>{const o=r.calendar&&parseInt(r.calendar)?[["rsvpmaker/calendar",r],["core/post-template",{layout:{type:"grid",columnCount:2}},[["core/post-title",{isLink:!0}],["core/post-featured-image"],["rsvpmaker/loop-blocks"],["core/read-more",{content:"Read More >>"}]]],["core/query-pagination"],["core/query-no-results",{},[["core/paragraph",{content:"No events found."}]]]]:[["core/post-template",{layout:{type:"grid",columnCount:2}},[["core/post-title",{isLink:!0}],["core/post-featured-image"],["rsvpmaker/loop-blocks"],["core/read-more",{content:"Read More >>"}]]],["core/query-pagination"],["core/query-no-results",{},[["core/paragraph",{content:"No events found."}]]]],a=(0,e.createBlocksFromInnerBlocksTemplate)(o);return(0,e.createBlock)("core/query",{queryId:0,query:{perPage:20,pages:0,offset:0,postType:"rsvpmaker",order:"asc",author:"",search:"",exclude:[],sticky:"",inherit:!1},namespace:"rsvpmaker/rsvpmaker-loop"},a)}}]}})}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e](n,n.exports,a),n.exports}a.m=r,e=[],a.O=(r,o,t,n)=>{if(!o){var l=1/0;for(p=0;p<e.length;p++){for(var[o,t,n]=e[p],s=!0,i=0;i<o.length;i++)(!1&n||l>=n)&&Object.keys(a.O).every(e=>a.O[e](o[i]))?o.splice(i--,1):(s=!1,n<l&&(l=n));if(s){e.splice(p--,1);var c=t();void 0!==c&&(r=c)}}return r}n=n||0;for(var p=e.length;p>0&&e[p-1][2]>n;p--)e[p]=e[p-1];e[p]=[o,t,n]},a.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),(()=>{var e={1209:0,349:0};a.O.j=r=>0===e[r];var r=(r,o)=>{var t,n,[l,s,i]=o,c=0;if(l.some(r=>0!==e[r])){for(t in s)a.o(s,t)&&(a.m[t]=s[t]);if(i)var p=i(a)}for(r&&r(o);c<l.length;c++)n=l[c],a.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return a.O(p)},o=globalThis.webpackChunkadmin=globalThis.webpackChunkadmin||[];o.forEach(r.bind(null,0)),o.push=r.bind(null,o.push.bind(o))})();var t=a.O(void 0,[349],()=>a(4565));t=a.O(t)})();