(()=>{"use strict";var e,a={337(){const e=window.wp.blocks,a=window.wp.i18n,l=window.wp.blockEditor,t=window.wp.components,r=window.ReactJSXRuntime,o=JSON.parse('{"UU":"sunflower/meta-data","uK":{"icon":{"type":"string","default":"fas fa-clock"},"url":{"type":"string","default":""}}}'),{uK:n}=o,s=[{attributes:n,save(e){const a=l.useBlockProps.save();return(0,r.jsx)("div",{...a,children:(0,r.jsx)("a",{href:e.attributes.url,target:"_blank",rel:"noopener",children:(0,r.jsx)("i",{className:e.attributes.icon})})})}}];(0,e.registerBlockType)(o.UU,{edit:function({attributes:e,setAttributes:o}){const n=(0,l.useBlockProps)({className:"row"}),{url:s,icon:i}=e;return(0,r.jsxs)("div",{...n,children:[(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(t.Disabled,{children:(0,r.jsx)("a",{href:s,target:"_blank",className:"#"===s||""===s?"text-danger":"text-ok",rel:"noopener noreferrer",children:(0,r.jsx)("i",{className:i})})})}),(0,r.jsx)(l.InspectorControls,{children:(0,r.jsxs)(t.PanelBody,{title:(0,a.__)("Settings"),children:[(0,r.jsx)(t.SelectControl,{label:(0,a.__)("Predefined Icons","sunflower-meta-data"),value:[],options:[{value:"none",label:"Bitte wählen"},{value:"fab fa-x-twitter",label:"X (Twitter)"},{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=>{o({icon:void 0===e?"none":e})}}),(0,r.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=>{o({icon:void 0===e?"none":e})}}),(0,r.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),o({url:void 0===e?"":e})}})]})})]})},save:function(e){const a=l.useBlockProps.save();return(0,r.jsx)("div",{...a,children:(0,r.jsx)("a",{href:e.attributes.url,target:"_blank",rel:"noopener noreferrer",children:(0,r.jsx)("i",{className:e.attributes.icon})})})},deprecated:s})}},l={};function t(e){var r=l[e];if(void 0!==r)return r.exports;var o=l[e]={exports:{}};return a[e](o,o.exports,t),o.exports}t.m=a,e=[],t.O=(a,l,r,o)=>{if(!l){var n=1/0;for(c=0;c<e.length;c++){for(var[l,r,o]=e[c],s=!0,i=0;i<l.length;i++)(!1&o||n>=o)&&Object.keys(t.O).every(e=>t.O[e](l[i]))?l.splice(i--,1):(s=!1,o<n&&(n=o));if(s){e.splice(c--,1);var u=r();void 0!==u&&(a=u)}}return a}o=o||0;for(var c=e.length;c>0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[l,r,o]},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 r,o,[n,s,i]=l,u=0;if(n.some(a=>0!==e[a])){for(r in s)t.o(s,r)&&(t.m[r]=s[r]);if(i)var c=i(t)}for(a&&a(l);u<n.length;u++)o=n[u],t.o(e,o)&&e[o]&&e[o][0](),e[o]=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 r=t.O(void 0,[260],()=>t(337));r=t.O(r)})();