(()=>{"use strict";var e={n:t=>{var l=t&&t.__esModule?()=>t.default:()=>t;return e.d(l,{a:l}),l},d:(t,l)=>{for(var n in l)e.o(l,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:l[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.blocks,l=window.wp.i18n,n=window.React,o=window.wp.blockEditor,a=window.wp.element,r=window.wp.components,s=window.wp.serverSideRender;var c=e.n(s);(0,t.registerBlockType)("eventpost/list",{edit:function({className:e,attributes:t,setAttributes:s,isSelected:i,id:u}){const _=(0,o.useBlockProps)(),{nb:p,future:v,past:b,cat:m,tag:d,geo:h,orderby:C,order:g,title:f,before_title:E,after_title:w,style:y,thumbnail:x,thumbnail_size:k,excerpt:T,blogs:S,pages:N}=t;return(0,n.createElement)("div",{..._},(0,n.createElement)(a.Fragment,null,i&&(0,n.createElement)(o.InspectorControls,null,(0,n.createElement)(r.TextControl,{value:f,onChange:function(e){s({title:e})},className:"title",placeholder:(0,l.__)("Title","event-post")}),(0,n.createElement)(r.PanelBody,{title:(0,l.__)("Filters")},(0,n.createElement)(r.CheckboxControl,{label:(0,l.__)("Display events","event-post"),checked:v,onChange:function(e){s({future:e})}}),(0,n.createElement)(r.CheckboxControl,{label:(0,l.__)("Display past events","event-post"),checked:b,onChange:function(e){s({past:e})}}),(0,n.createElement)(r.CheckboxControl,{label:(0,l.__)("Only geotagged events:","event-post"),value:h,onChange:function(e){s({geo:e})}}),(0,n.createElement)(r.RangeControl,{label:(0,l.__)("Max. number of events:","event-post"),value:p,onChange:function(e){s({nb:e})},className:"nb",min:-1,max:50,help:(0,l.__)("-1 is for: no limit","event-post")}),(0,n.createElement)(r.CheckboxControl,{label:(0,l.__)("Show pagination","event-post"),checked:N,onChange:function(e){s({pages:e})}}),(0,n.createElement)(r.TextControl,{label:(0,l.__)("Categories","event-post"),value:m,onChange:function(e){s({cat:e})},className:"category",placeholder:(0,l.__)("Categories, separated by comma","event-post")}),(0,n.createElement)(r.TextControl,{label:(0,l.__)("Tags","event-post"),value:d,onChange:function(e){s({tag:e})},className:"tag",placeholder:(0,l.__)("Tags, separated by comma","event-post")}),(0,n.createElement)(r.TextControl,{label:(0,l.__)("Blogs","event-post"),value:S,onChange:function(e){s({blogs:e})},className:"blogs"})),(0,n.createElement)(r.PanelBody,{title:(0,l._x)("Display","noun","event-post")},(0,n.createElement)(r.SelectControl,{label:(0,l.__)("Order by:","event-post"),value:C,options:[{label:"",value:""},{label:(0,l.__)("Post title","event-post"),value:"title"},{label:(0,l.__)("Event date","event-post"),value:"meta_value"}],onChange:function(e){s({orderby:e})}}),(0,n.createElement)(r.SelectControl,{label:(0,l.__)("Order:","event-post"),value:g,options:[{label:"",value:""},{label:(0,l.__)("Ascendant","event-post"),value:"ASC"},{label:(0,l.__)("Descendant","event-post"),value:"DESC"}],onChange:function(e){s({order:e})}}),(0,n.createElement)(r.TextControl,{value:E,onChange:function(e){s({before_title:e})},className:"before_title",placeholder:(0,l.__)("Before Title")}),(0,n.createElement)(r.TextControl,{value:w,onChange:function(e){s({after_title:e})},className:"after_title",placeholder:(0,l.__)("After Title","event-post")}),(0,n.createElement)(r.TextControl,{label:(0,l.__)("CSS Style","event-post"),value:y,onChange:function(e){s({style:e})},className:"style",placeholder:(0,l.__)("Style attribute","event-post")}),(0,n.createElement)(r.CheckboxControl,{label:(0,l.__)("Show excerpt","event-post"),checked:T,onChange:function(e){s({excerpt:e})}}),(0,n.createElement)(r.CheckboxControl,{label:(0,l.__)("Thumbnail","event-post"),checked:x,onChange:function(e){s({thumbnail:e})}}),(0,n.createElement)(r.SelectControl,{label:(0,l.__)("Thumbnail size:","event-post"),value:k,options:[{label:"",value:""},{label:(0,l.__)("Thumbnail","event-post"),value:"thumbnail"},{label:(0,l.__)("Medium","event-post"),value:"medium"},{label:(0,l.__)("Large","event-post"),value:"large"},{label:(0,l.__)("Full","event-post"),value:"full"}],onChange:function(e){s({thumbnail_size:e})}}))),(0,n.createElement)(c(),{block:"eventpost/list",attributes:t})))},save:function({attributes:e}){return null}})})();