(()=>{"use strict";var e,t={8166:()=>{const e=window.wp.blocks,t=window.wp.blockEditor,r=window.wp.components,s=window.wp.i18n,a=window.wp.element,l=window.ReactJSXRuntime,n=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"gatherpress/icon","version":"1.0.0","title":"Icon","description":"Adds customizable icons to visually enhance your content.","category":"gatherpress","icon":"format-image","example":{},"attributes":{"icon":{"type":"string","default":"nametag"},"iconColor":{"type":"string","default":""},"iconSize":{"type":"number","default":24}},"supports":{"align":["left","center","right"],"anchor":true,"html":false,"spacing":{"margin":true}},"textdomain":"gatherpress","editorScript":"file:./index.js","style":"file:./style-index.css","render":"file:./render.php"}');(0,e.registerBlockType)(n,{edit:({attributes:e,setAttributes:n})=>{const o=(0,t.useBlockProps)(),{icon:i,iconColor:c,iconSize:p}=e,[h,g]=(0,a.useState)(""),u=`${function(){if("object"==typeof GatherPress)return"urls.pluginUrl".split(".").reduce((e,t)=>e?.[t],GatherPress)}()}includes/assets/svg/`,d=[{label:(0,s.__)("Calendar","gatherpress"),value:"calendar"},{label:(0,s.__)("Clock","gatherpress"),value:"clock"},{label:(0,s.__)("Dismiss","gatherpress"),value:"dismiss"},{label:(0,s.__)("Editor Help","gatherpress"),value:"editor-help"},{label:(0,s.__)("Groups","gatherpress"),value:"groups"},{label:(0,s.__)("Location","gatherpress"),value:"location"},{label:(0,s.__)("Nametag","gatherpress"),value:"nametag"},{label:(0,s.__)("Yes Alt","gatherpress"),value:"yes-alt"}];return(0,a.useEffect)(()=>{i&&fetch(`${u}${i}.svg`).then(e=>e.text()).then(e=>g(e)).catch(()=>g(`${(0,s.__)("SVG Error","gatherpress")}`))},[i,u]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t.InspectorControls,{children:(0,l.jsxs)(r.PanelBody,{title:(0,s.__)("Icon Settings","gatherpress"),children:[(0,l.jsx)(r.SelectControl,{label:(0,s.__)("Icon","gatherpress"),value:i,options:d,onChange:e=>n({icon:e})}),(0,l.jsx)(r.ColorPalette,{label:(0,s.__)("Color","gatherpress"),value:c,clearable:!0,onChange:e=>n({iconColor:e})}),(0,l.jsx)(r.RangeControl,{label:(0,s.__)("Size","gatherpress"),value:p,onChange:e=>n({iconSize:e}),min:8,max:240,initialPosition:24})]})}),(0,l.jsx)("div",{...o,children:(0,l.jsx)("div",{style:{fill:c||"inherit",width:`${p}px`,height:`${p}px`,lineHeight:0},dangerouslySetInnerHTML:{__html:h}})})]})},save:()=>null})}},r={};function s(e){var a=r[e];if(void 0!==a)return a.exports;var l=r[e]={exports:{}};return t[e](l,l.exports,s),l.exports}s.m=t,e=[],s.O=(t,r,a,l)=>{if(!r){var n=1/0;for(p=0;p=l)&&Object.keys(s.O).every(e=>s.O[e](r[i]))?r.splice(i--,1):(o=!1,l0&&e[p-1][2]>l;p--)e[p]=e[p-1];e[p]=[r,a,l]},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={6022:0,3690:0};s.O.j=t=>0===e[t];var t=(t,r)=>{var a,l,[n,o,i]=r,c=0;if(n.some(t=>0!==e[t])){for(a in o)s.o(o,a)&&(s.m[a]=o[a]);if(i)var p=i(s)}for(t&&t(r);cs(8166));a=s.O(a)})();