(()=>{"use strict";var e={n:n=>{var a=n&&n.__esModule?()=>n.default:()=>n;return e.d(a,{a}),a},d:(n,a)=>{for(var t in a)e.o(a,t)&&!e.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:a[t]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n)};const n=window.wp.blocks,a=JSON.parse('{"UU":"events-manager/calendar"}'),t=window.React,l=window.wp.i18n,r=window.wp.blockEditor,o=window.wp.components,s=window.wp.serverSideRender;var v=e.n(s);const _=[{label:(0,l.__)("Responsive","events-manager"),value:"auto"},{label:(0,l.__)("Large","events-manager"),value:"large"},{label:(0,l.__)("Medium","events-manager"),value:"medium"},{label:(0,l.__)("Small","events-manager"),value:"small"}],c=[{label:(0,l.__)("Default (site setting)","events-manager"),value:""},{label:(0,l.__)("Pills","events-manager"),value:"pill"},{label:(0,l.__)("Single dot","events-manager"),value:"dot"},{label:(0,l.__)("Multiple dots","events-manager"),value:"dots"},{label:(0,l.__)("Rings","events-manager"),value:"ring"}],i="undefined"!=typeof window&&window.EMBlocks&&window.EMBlocks.archetypes||[];(0,n.registerBlockType)(a.UU,{edit:function({attributes:e,setAttributes:n}){const{title:a,long_events:s,category:g,scope:m,calendar_size:u,calendar_event_style:d,limit:p,event_archetype:b}=e;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(r.InspectorControls,null,(0,t.createElement)(o.PanelBody,{title:(0,l.__)("Calendar settings","events-manager")},(0,t.createElement)(o.TextControl,{label:(0,l.__)("Title","events-manager"),value:a,onChange:e=>n({title:e})}),(0,t.createElement)(o.ToggleControl,{label:(0,l.__)("Show long events","events-manager"),checked:!!s,onChange:e=>n({long_events:!!e})}),(0,t.createElement)(o.ToggleControl,{label:(0,l.__)("Future events only","events-manager"),checked:"future"===m,onChange:e=>n({scope:e?"future":"all"})}),(0,t.createElement)(o.TextControl,{label:(0,l.__)("Category IDs","events-manager"),help:(0,l.__)("1,2,3 or 2 (0 = all)","events-manager"),value:g,onChange:e=>n({category:e})}),i.length>0&&(0,t.createElement)(o.SelectControl,{label:(0,l.__)("Archetype","events-manager"),value:b,options:[{label:(0,l.__)("Default","events-manager"),value:""},...i],onChange:e=>n({event_archetype:e})}),(0,t.createElement)(o.SelectControl,{label:(0,l.__)("Calendar size","events-manager"),value:u,options:_,onChange:e=>n({calendar_size:e})}),(0,t.createElement)(o.SelectControl,{label:(0,l.__)("Event style","events-manager"),value:d,options:c,onChange:e=>n({calendar_event_style:e})}),(0,t.createElement)(o.TextControl,{type:"number",min:"0",label:(0,l.__)("Events per day","events-manager"),help:(0,l.__)("Max events shown per calendar day (0 = no limit; blank = site default).","events-manager"),value:p,onChange:e=>n({limit:e})}))),(0,t.createElement)("div",{...(0,r.useBlockProps)()},(0,t.createElement)(v(),{block:"events-manager/calendar",attributes:e})))},save:()=>null})})();