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