(()=>{"use strict";var e,a={241(){const e=window.wp.blocks,a=window.wp.blockEditor,n=window.wp.components,r=window.wp.i18n,t=JSON.parse('{"UU":"clanbite/user-nav"}'),s=window.ReactJSXRuntime;(0,e.registerBlockType)(t.UU,{edit:function({attributes:e,setAttributes:t}){const{avatarSize:i,showUsername:l}=e,o=(0,a.useBlockProps)({className:"clanbite-user-nav is-editor-preview"});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.InspectorControls,{children:(0,s.jsxs)(n.PanelBody,{title:(0,r.__)("Settings","clanbite"),children:[(0,s.jsx)(n.RangeControl,{label:(0,r.__)("Avatar Size","clanbite"),value:i,onChange:e=>t({avatarSize:e}),min:20,max:64,step:2}),(0,s.jsx)(n.ToggleControl,{label:(0,r.__)("Show Username","clanbite"),help:(0,r.__)("Display the username next to the avatar.","clanbite"),checked:l,onChange:e=>t({showUsername:e}),__nextHasNoMarginBottom:!0})]})}),(0,s.jsx)("div",{...o,children:(0,s.jsxs)("div",{className:"clanbite-user-nav__trigger",children:[(0,s.jsx)("span",{className:"clanbite-user-nav__avatar clanbite-user-nav__avatar--placeholder",style:{width:i,height:i}}),l&&(0,s.jsx)("span",{className:"clanbite-user-nav__username",children:(0,r.__)("Username","clanbite")}),(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor",className:"clanbite-user-nav__caret",children:(0,s.jsx)("path",{d:"M7 10l5 5 5-5z"})})]})})]})}})}},n={};function r(e){var t=n[e];if(void 0!==t)return t.exports;var s=n[e]={exports:{}};return a[e](s,s.exports,r),s.exports}r.m=a,e=[],r.O=(a,n,t,s)=>{if(!n){var i=1/0;for(h=0;h<e.length;h++){for(var[n,t,s]=e[h],l=!0,o=0;o<n.length;o++)(!1&s||i>=s)&&Object.keys(r.O).every(e=>r.O[e](n[o]))?n.splice(o--,1):(l=!1,s<i&&(i=s));if(l){e.splice(h--,1);var c=t();void 0!==c&&(a=c)}}return a}s=s||0;for(var h=e.length;h>0&&e[h-1][2]>s;h--)e[h]=e[h-1];e[h]=[n,t,s]},r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),(()=>{var e={9486:0,7650:0};r.O.j=a=>0===e[a];var a=(a,n)=>{var t,s,[i,l,o]=n,c=0;if(i.some(a=>0!==e[a])){for(t in l)r.o(l,t)&&(r.m[t]=l[t]);if(o)var h=o(r)}for(a&&a(n);c<i.length;c++)s=i[c],r.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return r.O(h)},n=globalThis.webpackChunkclanbite=globalThis.webpackChunkclanbite||[];n.forEach(a.bind(null,0)),n.push=a.bind(null,n.push.bind(n))})();var t=r.O(void 0,[7650],()=>r(241));t=r.O(t)})();