(()=>{"use strict";var e,a={337(){const e=window.wp.blocks,a=window.wp.i18n,l=window.wp.blockEditor,t=window.wp.components,o=window.ReactJSXRuntime,r=JSON.parse('{"UU":"sunflower/meta-data","uK":{"icon":{"type":"string","default":"fas fa-clock"},"url":{"type":"string","default":""}}}'),{uK:n}=r,s=[{attributes:n,save(e){const a=l.useBlockProps.save();return(0,o.jsx)("div",{...a,children:(0,o.jsx)("a",{href:e.attributes.url,target:"_blank",rel:"noopener",children:(0,o.jsx)("i",{className:e.attributes.icon})})})}}];(0,e.registerBlockType)(r.UU,{edit:function({attributes:e,setAttributes:r}){const n=(0,l.useBlockProps)({className:"row"}),{url:s,icon:i}=e;return(0,o.jsxs)("div",{...n,children:[(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(t.Disabled,{children:(0,o.jsx)("a",{href:s,target:"_blank",className:"#"===s||""===s?"text-danger":"text-ok",rel:"noopener noreferrer",children:(0,o.jsx)("i",{className:i})})})}),(0,o.jsx)(l.InspectorControls,{children:(0,o.jsxs)(t.PanelBody,{title:(0,a.__)("Settings"),children:[(0,o.jsx)(t.SelectControl,{label:(0,a.__)("Predefined Icons","sunflower-meta-data"),value:[],options:[{value:"none",label:"Bitte wählen"},{value:"fab fa-bluesky",label:"Bluesky"},{value:"fab fa-instagram",label:"Instagram"},{value:"fab fa-facebook-f",label:"Facebook"},{value:"fab fa-linkedin",label:"LinkedIn"},{value:"fab fa-mastodon",label:"Mastodon"},{value:"fab fa-threads",label:"Threads"},{value:"fab fa-tiktok",label:"TikTok"},{value:"fab fa-whatsapp",label:"WhatsApp"},{value:"fab fa-xing",label:"Xing"},{value:"fab fa-youtube",label:"YouTube"},{value:"fas fa-envelope",label:"E-Mail"},{value:"fas fa-globe",label:"Website"}],onChange:e=>{r({icon:void 0===e?"none":e})}}),(0,o.jsx)(t.TextControl,{label:(0,a.__)("Selected Icon","sunflower-meta-data"),help:(0,a.__)("All icons can be found at https://fontawesome.com/icons?d=gallery&m=free","sunflower-meta-data"),value:i,onChange:e=>{r({icon:void 0===e?"none":e})}}),(0,o.jsx)(t.TextControl,{label:"URL",help:(0,a.__)("Target URL the Icon is linked to. For email addresses, use the format mailto:example@example.com.","sunflower-meta-data"),value:s,placeholder:"https://gruene.social/@verdigado",onChange:e=>{/^[^\s@\/]+@[^\s@]+\.[^\s@]{2,10}$/.test(e)&&"mailto:"!==e.substring(0,7)&&(e="mailto:"+e),r({url:void 0===e?"":e})}})]})})]})},save:function(e){const a=l.useBlockProps.save();return(0,o.jsx)("div",{...a,children:(0,o.jsx)("a",{href:e.attributes.url,target:"_blank",rel:"noopener noreferrer",children:(0,o.jsx)("i",{className:e.attributes.icon})})})},deprecated:s})}},l={};function t(e){var o=l[e];if(void 0!==o)return o.exports;var r=l[e]={exports:{}};return a[e](r,r.exports,t),r.exports}t.m=a,e=[],t.O=(a,l,o,r)=>{if(!l){var n=1/0;for(c=0;c<e.length;c++){for(var[l,o,r]=e[c],s=!0,i=0;i<l.length;i++)(!1&r||n>=r)&&Object.keys(t.O).every(e=>t.O[e](l[i]))?l.splice(i--,1):(s=!1,r<n&&(n=r));if(s){e.splice(c--,1);var u=o();void 0!==u&&(a=u)}}return a}r=r||0;for(var c=e.length;c>0&&e[c-1][2]>r;c--)e[c]=e[c-1];e[c]=[l,o,r]},t.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),(()=>{var e={572:0,260:0};t.O.j=a=>0===e[a];var a=(a,l)=>{var o,r,[n,s,i]=l,u=0;if(n.some(a=>0!==e[a])){for(o in s)t.o(s,o)&&(t.m[o]=s[o]);if(i)var c=i(t)}for(a&&a(l);u<n.length;u++)r=n[u],t.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return t.O(c)},l=globalThis.webpackChunksunflower=globalThis.webpackChunksunflower||[];l.forEach(a.bind(null,0)),l.push=a.bind(null,l.push.bind(l))})();var o=t.O(void 0,[260],()=>t(337));o=t.O(o)})();