(()=>{"use strict";var e,o={730(){const e=window.wp.blocks,o=window.wp.i18n,c=window.wp.blockEditor,n=window.wp.components,a=window.wp.element,r=window.ReactJSXRuntime,i=JSON.parse('{"UU":"sunflower/accordion"}');(0,e.registerBlockType)(i.UU,{edit:function({attributes:e,setAttributes:i,clientId:s}){const l=(0,c.useBlockProps)({className:"accordion"});return(0,a.useEffect)(()=>{i({blockId:s})},[s,i]),(0,r.jsx)("div",{...l,children:(0,r.jsxs)("div",{className:"accordion-item",children:[(0,r.jsx)("h4",{className:"accordion-header",children:(0,r.jsx)(n.TextControl,{className:"accordion-button",hideLabelFromVision:"true",label:(0,o.__)("Clickable text opening the selection","sunflower-accordion"),onChange:e=>{i({headline:e})},value:e.headline,placeholder:(0,o.__)("Titel of the accordion item","sunflower-accordion")})}),(0,r.jsx)("div",{className:"accordion-body",children:(0,r.jsx)(c.RichText,{onChange:e=>{i({content:e})},value:e.content,placeholder:(0,o.__)("Text content of the openend accordion item.","sunflower-accordion")})})]})})},save:function({attributes:e}){const o=c.useBlockProps.save();return(0,r.jsx)("div",{...o,children:(0,r.jsxs)("div",{className:"accordion-item",children:[(0,r.jsx)("h4",{className:"accordion-header",children:(0,r.jsx)("button",{className:"accordion-button collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#sacc-"+e.blockId,"aria-expanded":"false","aria-controls":"sacc-"+e.blockId,id:"saccid-"+e.blockId,children:e.headline})}),(0,r.jsx)("div",{id:"sacc-"+e.blockId,role:"region",className:"accordion-collapse collapse","aria-labelledby":"saccid-"+e.blockId,children:(0,r.jsx)("div",{className:"accordion-body",children:(0,r.jsx)(c.RichText.Content,{className:"sunflower-accordion",tagName:"p",value:e.content})})})]})})}})}},c={};function n(e){var a=c[e];if(void 0!==a)return a.exports;var r=c[e]={exports:{}};return o[e](r,r.exports,n),r.exports}n.m=o,e=[],n.O=(o,c,a,r)=>{if(!c){var i=1/0;for(d=0;d<e.length;d++){for(var[c,a,r]=e[d],s=!0,l=0;l<c.length;l++)(!1&r||i>=r)&&Object.keys(n.O).every(e=>n.O[e](c[l]))?c.splice(l--,1):(s=!1,r<i&&(i=r));if(s){e.splice(d--,1);var t=a();void 0!==t&&(o=t)}}return o}r=r||0;for(var d=e.length;d>0&&e[d-1][2]>r;d--)e[d]=e[d-1];e[d]=[c,a,r]},n.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),(()=>{var e={170:0,246:0};n.O.j=o=>0===e[o];var o=(o,c)=>{var a,r,[i,s,l]=c,t=0;if(i.some(o=>0!==e[o])){for(a in s)n.o(s,a)&&(n.m[a]=s[a]);if(l)var d=l(n)}for(o&&o(c);t<i.length;t++)r=i[t],n.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return n.O(d)},c=globalThis.webpackChunksunflower=globalThis.webpackChunksunflower||[];c.forEach(o.bind(null,0)),c.push=o.bind(null,c.push.bind(c))})();var a=n.O(void 0,[246],()=>n(730));a=n.O(a)})();