(()=>{"use strict";var e,t={650(){const e=window.wp.blocks,t=window.wp.i18n,l=window.wp.blockEditor,a=window.wp.components,n=window.ReactJSXRuntime,i=[{label:(0,t.__)("Any status","clanbite"),value:""},{label:(0,t.__)("Scheduled","clanbite"),value:"scheduled"},{label:(0,t.__)("Live","clanbite"),value:"live"},{label:(0,t.__)("Finished","clanbite"),value:"finished"},{label:(0,t.__)("Cancelled","clanbite"),value:"cancelled"}],o=JSON.parse('{"UU":"clanbite/match-list"}');(0,e.registerBlockType)(o.UU,{edit:function({attributes:e,setAttributes:o}){const{teamId:s,limit:r,statusFilter:c,order:b}=e;return(0,n.jsxs)("div",{...(0,l.useBlockProps)(),children:[(0,n.jsx)(l.InspectorControls,{children:(0,n.jsxs)(a.PanelBody,{title:(0,t.__)("Match list","clanbite"),children:[(0,n.jsx)(a.TextControl,{label:(0,t.__)("Team post ID (optional)","clanbite"),help:(0,t.__)("Limit to matches involving this team (`cp_team` ID). Leave 0 for all teams.","clanbite"),type:"number",value:s||"",onChange:e=>o({teamId:parseInt(e,10)||0}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,n.jsx)(a.TextControl,{label:(0,t.__)("Max matches","clanbite"),help:(0,t.__)("0 uses the default from Clanbite → Matches settings.","clanbite"),type:"number",value:r||"",onChange:e=>o({limit:parseInt(e,10)||0}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,n.jsx)(a.SelectControl,{label:(0,t.__)("Status filter","clanbite"),value:c,options:i,onChange:e=>o({statusFilter:e})}),(0,n.jsx)(a.SelectControl,{label:(0,t.__)("Sort by scheduled time","clanbite"),value:b,options:[{label:(0,t.__)("Ascending","clanbite"),value:"asc"},{label:(0,t.__)("Descending","clanbite"),value:"desc"}],onChange:e=>o({order:e})})]})}),(0,n.jsx)("p",{className:"clanbite-match-list-editor-note",children:(0,t.__)("Match list (preview on the front end).","clanbite")})]})},save:()=>null})}},l={};function a(e){var n=l[e];if(void 0!==n)return n.exports;var i=l[e]={exports:{}};return t[e](i,i.exports,a),i.exports}a.m=t,e=[],a.O=(t,l,n,i)=>{if(!l){var o=1/0;for(b=0;b<e.length;b++){for(var[l,n,i]=e[b],s=!0,r=0;r<l.length;r++)(!1&i||o>=i)&&Object.keys(a.O).every(e=>a.O[e](l[r]))?l.splice(r--,1):(s=!1,i<o&&(o=i));if(s){e.splice(b--,1);var c=n();void 0!==c&&(t=c)}}return t}i=i||0;for(var b=e.length;b>0&&e[b-1][2]>i;b--)e[b]=e[b-1];e[b]=[l,n,i]},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={2288:0,9352:0};a.O.j=t=>0===e[t];var t=(t,l)=>{var n,i,[o,s,r]=l,c=0;if(o.some(t=>0!==e[t])){for(n in s)a.o(s,n)&&(a.m[n]=s[n]);if(r)var b=r(a)}for(t&&t(l);c<o.length;c++)i=o[c],a.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return a.O(b)},l=globalThis.webpackChunkclanbite=globalThis.webpackChunkclanbite||[];l.forEach(t.bind(null,0)),l.push=t.bind(null,l.push.bind(l))})();var n=a.O(void 0,[9352],()=>a(650));n=a.O(n)})();