(()=>{"use strict";var e,t={357(){const e=window.wp.blocks,t=JSON.parse('{"UU":"clanbite/event-calendar"}'),l=window.wp.blockEditor,n=window.wp.components,a=window.wp.i18n,o=window.ReactJSXRuntime;(0,e.registerBlockType)(t.UU,{edit:function({attributes:e,setAttributes:t}){const{scopeType:r,teamId:i,groupId:s,playerUserId:c,defaultView:p}=e,u=(0,l.useBlockProps)({className:"clanbite-event-calendar-editor"});return(0,o.jsxs)("div",{...u,children:[(0,o.jsx)(l.InspectorControls,{children:(0,o.jsxs)(n.PanelBody,{title:(0,a.__)("Context","clanbite"),children:[(0,o.jsx)(n.SelectControl,{label:(0,a.__)("Scope","clanbite"),value:r,options:[{label:(0,a.__)("Team","clanbite"),value:"team"},{label:(0,a.__)("Group","clanbite"),value:"group"},{label:(0,a.__)("Player (own profile only)","clanbite"),value:"player"}],onChange:e=>t({scopeType:e})}),"team"===r&&(0,o.jsx)(n.TextControl,{label:(0,a.__)("Team ID (0 = URL context)","clanbite"),type:"number",value:i||"",onChange:e=>t({teamId:parseInt(e,10)||0}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),"group"===r&&(0,o.jsx)(n.TextControl,{label:(0,a.__)("Group ID (0 = URL context)","clanbite"),type:"number",value:s||"",onChange:e=>t({groupId:parseInt(e,10)||0}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),"player"===r&&(0,o.jsx)(n.TextControl,{help:(0,a.__)("0 uses the profile user from the URL; only shown to that logged-in user.","clanbite"),label:(0,a.__)("User ID override","clanbite"),type:"number",value:c||"",onChange:e=>t({playerUserId:parseInt(e,10)||0}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,o.jsx)(n.SelectControl,{label:(0,a.__)("Default view","clanbite"),value:p,options:[{label:(0,a.__)("Month","clanbite"),value:"month"},{label:(0,a.__)("Week","clanbite"),value:"week"},{label:(0,a.__)("Day","clanbite"),value:"day"},{label:(0,a.__)("List","clanbite"),value:"list"}],onChange:e=>t({defaultView:e})})]})}),(0,o.jsx)("p",{children:(0,a.__)("Event calendar (front-end)","clanbite")})]})},save:()=>null})}},l={};function n(e){var a=l[e];if(void 0!==a)return a.exports;var o=l[e]={exports:{}};return t[e](o,o.exports,n),o.exports}n.m=t,e=[],n.O=(t,l,a,o)=>{if(!l){var r=1/0;for(p=0;p<e.length;p++){for(var[l,a,o]=e[p],i=!0,s=0;s<l.length;s++)(!1&o||r>=o)&&Object.keys(n.O).every(e=>n.O[e](l[s]))?l.splice(s--,1):(i=!1,o<r&&(r=o));if(i){e.splice(p--,1);var c=a();void 0!==c&&(t=c)}}return t}o=o||0;for(var p=e.length;p>0&&e[p-1][2]>o;p--)e[p]=e[p-1];e[p]=[l,a,o]},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={4757:0,4713:0};n.O.j=t=>0===e[t];var t=(t,l)=>{var a,o,[r,i,s]=l,c=0;if(r.some(t=>0!==e[t])){for(a in i)n.o(i,a)&&(n.m[a]=i[a]);if(s)var p=s(n)}for(t&&t(l);c<r.length;c++)o=r[c],n.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return n.O(p)},l=globalThis.webpackChunkclanbite=globalThis.webpackChunkclanbite||[];l.forEach(t.bind(null,0)),l.push=t.bind(null,l.push.bind(l))})();var a=n.O(void 0,[4713],()=>n(357));a=n.O(a)})();