(()=>{"use strict";var e,a={337(){const e=window.wp.blocks,a=window.wp.i18n,l=window.wp.blockEditor,r=window.wp.components,s=window.ReactJSXRuntime,t=JSON.parse('{"UU":"sunflower/meta-data","uK":{"icon":{"type":"string","default":"fas fa-clock"},"url":{"type":"string","default":""}}}'),{uK:n}=t,o=[{attributes:n,save(e){const a=l.useBlockProps.save(),{url:r,icon:t}=e.attributes;return(0,s.jsx)("div",{...a,children:(0,s.jsx)("a",{href:r,target:"_blank",rel:"noopener noreferrer",children:(0,s.jsx)("i",{className:t})})})}},{attributes:n,save(e){const a=l.useBlockProps.save();return(0,s.jsx)("div",{...a,children:(0,s.jsx)("a",{href:e.attributes.url,target:"_blank",rel:"noopener",children:(0,s.jsx)("i",{className:e.attributes.icon})})})}}];(0,e.registerBlockType)(t.UU,{edit:function({attributes:e,setAttributes:t}){const n=(0,l.useBlockProps)({className:"row"}),{url:o,icon:i}=e;return(0,s.jsxs)("div",{...n,children:[(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(r.Disabled,{children:o?(0,s.jsx)("a",{href:o,target:"_blank",className:"sunflower-meta-data__link",rel:"noopener noreferrer",children:(0,s.jsx)("i",{className:i})}):(0,s.jsx)("i",{className:`${i} is-empty`})})}),(0,s.jsx)(l.InspectorControls,{children:(0,s.jsxs)(r.PanelBody,{title:(0,a.__)("Settings"),children:[(0,s.jsx)(r.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=>{t({icon:void 0===e?"none":e})}}),(0,s.jsx)(r.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=>{t({icon:void 0===e?"none":e})}}),(0,s.jsx)(r.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:o,placeholder:"https://gruene.social/@verdigado",onChange:e=>{/^[^\s@\/]+@[^\s@]+\.[^\s@]{2,10}$/.test(e)&&"mailto:"!==e.substring(0,7)&&(e="mailto:"+e),t({url:void 0===e?"":e})}})]})})]})},save:function(e){const a=l.useBlockProps.save(),{url:r,icon:t}=e.attributes;return(0,s.jsx)("div",{...a,children:r?(0,s.jsx)("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"sunflower-meta-data__link",children:(0,s.jsx)("i",{className:t})}):(0,s.jsx)("i",{className:`${t} is-empty`})})},deprecated:o})}},l={};function r(e){var s=l[e];if(void 0!==s)return s.exports;var t=l[e]={exports:{}};return a[e](t,t.exports,r),t.exports}r.m=a,e=[],r.O=(a,l,s,t)=>{if(!l){var n=1/0;for(c=0;c<e.length;c++){for(var[l,s,t]=e[c],o=!0,i=0;i<l.length;i++)(!1&t||n>=t)&&Object.keys(r.O).every(e=>r.O[e](l[i]))?l.splice(i--,1):(o=!1,t<n&&(n=t));if(o){e.splice(c--,1);var u=s();void 0!==u&&(a=u)}}return a}t=t||0;for(var c=e.length;c>0&&e[c-1][2]>t;c--)e[c]=e[c-1];e[c]=[l,s,t]},r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),(()=>{var e={572:0,260:0};r.O.j=a=>0===e[a];var a=(a,l)=>{var s,t,[n,o,i]=l,u=0;if(n.some(a=>0!==e[a])){for(s in o)r.o(o,s)&&(r.m[s]=o[s]);if(i)var c=i(r)}for(a&&a(l);u<n.length;u++)t=n[u],r.o(e,t)&&e[t]&&e[t][0](),e[t]=0;return r.O(c)},l=globalThis.webpackChunksunflower=globalThis.webpackChunksunflower||[];l.forEach(a.bind(null,0)),l.push=a.bind(null,l.push.bind(l))})();var s=r.O(void 0,[260],()=>r(337));s=r.O(s)})();