(()=>{"use strict";var e,l={983(){const e=window.wp.blocks,l=window.wp.i18n,t=window.wp.blockEditor,a=window.wp.components,n=window.ReactJSXRuntime;function r({attributes:e,setAttributes:r,toggleLabel:i}){const{isLink:o,linkTarget:s,rel:c}=e;return(0,n.jsx)(t.InspectorControls,{children:(0,n.jsxs)(a.__experimentalToolsPanel,{label:(0,l.__)("Link","clanbite"),resetAll:()=>r({isLink:!1,linkTarget:"_self",rel:""}),children:[(0,n.jsx)(a.__experimentalToolsPanelItem,{label:i,isShownByDefault:!0,hasValue:()=>!!o,onDeselect:()=>r({isLink:!1,linkTarget:"_self",rel:""}),children:(0,n.jsx)(a.ToggleControl,{label:i,checked:!!o,onChange:e=>r({isLink:!!e}),__nextHasNoMarginBottom:!0})}),o?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.__experimentalToolsPanelItem,{label:(0,l.__)("Open in new tab","clanbite"),isShownByDefault:!0,hasValue:()=>"_blank"===s,onDeselect:()=>r({linkTarget:"_self"}),children:(0,n.jsx)(a.ToggleControl,{label:(0,l.__)("Open in new tab","clanbite"),checked:"_blank"===s,onChange:e=>r({linkTarget:e?"_blank":"_self"}),__nextHasNoMarginBottom:!0})}),(0,n.jsx)(a.__experimentalToolsPanelItem,{label:(0,l.__)("Link rel","clanbite"),isShownByDefault:!0,hasValue:()=>!!c,onDeselect:()=>r({rel:""}),children:(0,n.jsx)(a.TextControl,{label:(0,l.__)("Link rel","clanbite"),value:c||"",onChange:e=>r({rel:null!=e?e:""}),help:(0,l.__)("Optional rel value. noopener and noreferrer are added automatically for new tabs.","clanbite"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})})]}):null]})})}const i=[{label:(0,l.__)("Large — team profiles","clanbite"),value:"large"},{label:(0,l.__)("Medium — feeds & lists","clanbite"),value:"medium"},{label:(0,l.__)("Small — compact UI","clanbite"),value:"small"}],o=JSON.parse('{"UU":"clanbite/team-avatar"}');(0,e.registerBlockType)(o.UU,{edit:function({attributes:e,setAttributes:o}){const{avatarPreset:s}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.InspectorControls,{children:(0,n.jsx)(a.PanelBody,{title:(0,l.__)("Avatar output","clanbite"),children:(0,n.jsx)(a.SelectControl,{label:(0,l.__)("Image size preset","clanbite"),help:(0,l.__)("Uses the matching size from Clanbite → Teams → Team avatar image sizes.","clanbite"),value:s||"large",options:i,onChange:e=>o({avatarPreset:e||"large"}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})})}),(0,n.jsx)(r,{attributes:e,setAttributes:o,toggleLabel:(0,l.__)("Link image to team profile","clanbite")}),(0,n.jsx)("div",{...(0,t.useBlockProps)(),children:(0,n.jsx)("p",{className:"clanbite-team-block-placeholder",children:(0,l.__)("Team avatar (single team template)","clanbite")})})]})}})}},t={};function a(e){var n=t[e];if(void 0!==n)return n.exports;var r=t[e]={exports:{}};return l[e](r,r.exports,a),r.exports}a.m=l,e=[],a.O=(l,t,n,r)=>{if(!t){var i=1/0;for(b=0;b<e.length;b++){for(var[t,n,r]=e[b],o=!0,s=0;s<t.length;s++)(!1&r||i>=r)&&Object.keys(a.O).every(e=>a.O[e](t[s]))?t.splice(s--,1):(o=!1,r<i&&(i=r));if(o){e.splice(b--,1);var c=n();void 0!==c&&(l=c)}}return l}r=r||0;for(var b=e.length;b>0&&e[b-1][2]>r;b--)e[b]=e[b-1];e[b]=[t,n,r]},a.o=(e,l)=>Object.prototype.hasOwnProperty.call(e,l),(()=>{var e={5052:0,3316:0};a.O.j=l=>0===e[l];var l=(l,t)=>{var n,r,[i,o,s]=t,c=0;if(i.some(l=>0!==e[l])){for(n in o)a.o(o,n)&&(a.m[n]=o[n]);if(s)var b=s(a)}for(l&&l(t);c<i.length;c++)r=i[c],a.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return a.O(b)},t=globalThis.webpackChunkclanbite=globalThis.webpackChunkclanbite||[];t.forEach(l.bind(null,0)),t.push=l.bind(null,t.push.bind(t))})();var n=a.O(void 0,[3316],()=>a(983));n=a.O(n)})();