(()=>{"use strict";var e,s={9128(){const e=window.wp.blocks,s=window.ReactJSXRuntime,{__}=wp.i18n,{Fragment:r}=wp.element,{Component:t}=wp.element,{InspectorControls:i,useBlockProps:l}=wp.blockEditor,{Panel:a,PanelBody:n,SelectControl:o,TextControl:p,TextareaControl:c,ToggleControl:u,RadioControl:d}=wp.components,m=JSON.parse('{"UU":"rsvpmaker/emailguestsignup"}');(0,e.registerBlockType)(m.UU,{edit:function(e){const{attributes:{fields:r},className:t,setAttributes:p,isSelected:c}=e,u=l({style:{backgroundColor:"#fff",padding:"5px"},className:"wp-block-rsvpmaker-emailguestsignup"});return console.log(u),(0,s.jsxs)("div",{...u,children:[(0,s.jsx)(i,{children:(0,s.jsx)(a,{children:(0,s.jsx)(n,{children:(0,s.jsx)(o,{label:__("Fields to Display","rsvpmaker"),options:[{label:__("First Name, Last Name, Email"),value:""},{label:__("First Name, Email"),value:"first"},{label:__("Email"),value:"email"}],value:r,onChange:e=>p({fields:e})})})})}),""==r&&(0,s.jsxs)("div",{children:[(0,s.jsx)("h4",{children:__("Email List Signup","rsvpmaker")}),(0,s.jsxs)("p",{children:[(0,s.jsx)("label",{children:__("First Name","rsvpmaker")})," ",(0,s.jsx)("input",{type:"text",id:"rsvpguest_list_first",name:"rsvpguest_list_first"})]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("label",{children:__("Last Name","rsvpmaker")})," ",(0,s.jsx)("input",{type:"text",id:"rsvpguest_list_last",name:"rsvpguest_list_last"})]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("label",{children:__("Email","rsvpmaker")})," ",(0,s.jsx)("input",{type:"text",id:"rsvpguest_list_email",name:"rsvpguest_list_email"})]})]}),"first"==r&&(0,s.jsxs)("div",{children:[(0,s.jsx)("h4",{children:__("Email List Signup","rsvpmaker")}),(0,s.jsxs)("p",{children:[(0,s.jsx)("label",{children:__("First Name","rsvpmaker")}),(0,s.jsx)("input",{type:"text",id:"rsvpguest_list_first",name:"rsvpguest_list_first"})]}),(0,s.jsx)("input",{type:"hidden",id:"rsvpguest_list_last",name:"rsvpguest_list_last"}),(0,s.jsxs)("p",{children:[(0,s.jsx)("label",{children:__("Email","rsvpmaker")}),(0,s.jsx)("input",{type:"text",id:"rsvpguest_list_email",name:"rsvpguest_list_email"})]})]}),"email"==r&&(0,s.jsxs)("div",{children:[(0,s.jsx)("h4",{children:__("Email List Signup","rsvpmaker")}),(0,s.jsx)("input",{type:"hidden",id:"rsvpguest_list_first",name:"rsvpguest_list_first"}),(0,s.jsx)("input",{type:"hidden",id:"rsvpguest_list_last",name:"rsvpguest_list_last"}),(0,s.jsxs)("p",{children:[(0,s.jsx)("label",{children:__("Email","rsvpmaker")}),(0,s.jsx)("input",{type:"text",id:"rsvpguest_list_email",name:"rsvpguest_list_email"})]})]})]})},save:function(){return null},transforms:{to:[{type:"block",blocks:["core/query"],transform:s=>{const r=s.calendar&&parseInt(s.calendar)?[["rsvpmaker/calendar",s],["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."}]]]],t=(0,e.createBlocksFromInnerBlocksTemplate)(r);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"},t)}}]}})}},r={};function t(e){var i=r[e];if(void 0!==i)return i.exports;var l=r[e]={exports:{}};return s[e](l,l.exports,t),l.exports}t.m=s,e=[],t.O=(s,r,i,l)=>{if(!r){var a=1/0;for(c=0;c<e.length;c++){for(var[r,i,l]=e[c],n=!0,o=0;o<r.length;o++)(!1&l||a>=l)&&Object.keys(t.O).every(e=>t.O[e](r[o]))?r.splice(o--,1):(n=!1,l<a&&(a=l));if(n){e.splice(c--,1);var p=i();void 0!==p&&(s=p)}}return s}l=l||0;for(var c=e.length;c>0&&e[c-1][2]>l;c--)e[c]=e[c-1];e[c]=[r,i,l]},t.o=(e,s)=>Object.prototype.hasOwnProperty.call(e,s),(()=>{var e={166:0,8010:0};t.O.j=s=>0===e[s];var s=(s,r)=>{var i,l,[a,n,o]=r,p=0;if(a.some(s=>0!==e[s])){for(i in n)t.o(n,i)&&(t.m[i]=n[i]);if(o)var c=o(t)}for(s&&s(r);p<a.length;p++)l=a[p],t.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return t.O(c)},r=globalThis.webpackChunkadmin=globalThis.webpackChunkadmin||[];r.forEach(s.bind(null,0)),r.push=s.bind(null,r.push.bind(r))})();var i=t.O(void 0,[8010],()=>t(9128));i=t.O(i)})();