(()=>{"use strict";var e,a={23(){const e=window.wp.blocks,a=window.wp.i18n,n=window.wp.blockEditor,l=window.wp.components,t=window.ReactJSXRuntime,i=JSON.parse('{"UU":"clanbite/player-country"}');(0,e.registerBlockType)(i.UU,{edit:function({attributes:e,setAttributes:i}){const{showCode:r,countryDisplay:o,flagFirst:s}=e;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.InspectorControls,{children:(0,t.jsxs)(l.PanelBody,{title:(0,a.__)("Country display","clanbite"),children:[(0,t.jsx)(l.SelectControl,{label:(0,a.__)("Show","clanbite"),value:o||"both",options:[{label:(0,a.__)("Flag and country","clanbite"),value:"both"},{label:(0,a.__)("Flag only","clanbite"),value:"flag"},{label:(0,a.__)("Country only","clanbite"),value:"text"}],onChange:e=>i({countryDisplay:e||"both"}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),"both"!==o&&o?null:(0,t.jsx)(l.SelectControl,{label:(0,a.__)("Order","clanbite"),value:s?"flag":"text",options:[{label:(0,a.__)("Flag first","clanbite"),value:"flag"},{label:(0,a.__)("Country first","clanbite"),value:"text"}],onChange:e=>i({flagFirst:"flag"===e}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,t.jsx)(l.ToggleControl,{label:(0,a.__)("Show country code in text","clanbite"),checked:!!r,onChange:e=>i({showCode:!!e}),help:(0,a.__)("When the country name is shown, append the ISO code in parentheses.","clanbite"),__nextHasNoMarginBottom:!0})]})}),(0,t.jsxs)("div",{...(0,n.useBlockProps)({className:"clanbite-player-country-editor"}),children:[(0,t.jsxs)("div",{className:"clanbite-country-display clanbite-country-display--preview",children:[("both"===o||!o)&&(0,t.jsx)(t.Fragment,{children:s?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"clanbite-country-flag clanbite-country-flag--preview","aria-hidden":"true"}),(0,t.jsx)("span",{className:"clanbite-country-display__label",children:(0,a.__)("United Kingdom","clanbite")})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"clanbite-country-display__label",children:(0,a.__)("United Kingdom","clanbite")}),(0,t.jsx)("span",{className:"clanbite-country-flag clanbite-country-flag--preview","aria-hidden":"true"})]})}),"text"===o&&(0,t.jsx)("span",{className:"clanbite-country-display__label",children:(0,a.__)("United Kingdom","clanbite")}),"flag"===o&&(0,t.jsx)("span",{className:"clanbite-country-flag clanbite-country-flag--preview","aria-hidden":"true"})]}),(0,t.jsx)("p",{className:"clanbite-player-block-placeholder",children:(0,a.__)("Player country","clanbite")})]})]})}})}},n={};function l(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}};return a[e](i,i.exports,l),i.exports}l.m=a,e=[],l.O=(a,n,t,i)=>{if(!n){var r=1/0;for(b=0;b<e.length;b++){for(var[n,t,i]=e[b],o=!0,s=0;s<n.length;s++)(!1&i||r>=i)&&Object.keys(l.O).every(e=>l.O[e](n[s]))?n.splice(s--,1):(o=!1,i<r&&(r=i));if(o){e.splice(b--,1);var c=t();void 0!==c&&(a=c)}}return a}i=i||0;for(var b=e.length;b>0&&e[b-1][2]>i;b--)e[b]=e[b-1];e[b]=[n,t,i]},l.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),(()=>{var e={4337:0,69:0};l.O.j=a=>0===e[a];var a=(a,n)=>{var t,i,[r,o,s]=n,c=0;if(r.some(a=>0!==e[a])){for(t in o)l.o(o,t)&&(l.m[t]=o[t]);if(s)var b=s(l)}for(a&&a(n);c<r.length;c++)i=r[c],l.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return l.O(b)},n=globalThis.webpackChunkclanbite=globalThis.webpackChunkclanbite||[];n.forEach(a.bind(null,0)),n.push=a.bind(null,n.push.bind(n))})();var t=l.O(void 0,[69],()=>l(23));t=l.O(t)})();