(()=>{"use strict";var e,n={573:()=>{const e=window.wp.blocks,n=window.React,t=window.wp.i18n,a=window.wp.element,o=window.wp.blockEditor,r=JSON.parse('{"UU":"ucla-wordpress-plugin/accordion-item"}');(0,e.registerBlockType)(r.UU,{parent:["ucla-wordpress-plugin/accordion"],edit:({attributes:e,setAttributes:r,clientId:c})=>{let{accordionHeading:l,accordionHeadingLevel:i}=e,[s,d]=(0,a.useState)(!0);const m=(0,o.useBlockProps)({className:"accordion-item"}),p="h"+i;return(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{...m},(0,n.createElement)("div",{className:"accordion__heading"},(0,n.createElement)("span",{className:"accordion__heading-button"},(0,n.createElement)(o.BlockControls,{group:"block"},(0,n.createElement)(o.HeadingLevelDropdown,{value:i,onChange:e=>r({accordionHeadingLevel:e})})),(0,n.createElement)(o.RichText,{value:l||"",tagName:p,allowedFormats:[],onChange:e=>r({accordionHeading:e}),placeholder:(0,t.__)("Accordion Heading","ucla-wordpress-plugin")}),(0,n.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:()=>{d(!s)},style:s?{transform:"rotate(180deg)"}:{}},(0,n.createElement)("path",{d:"M18 9.41L16.59 8L12 12.58L7.41 8L6 9.41L12 15.41L18 9.41Z",fill:"#333333"})))),(0,n.createElement)("div",{className:"accordion__body",hidden:!s},(0,n.createElement)("div",{className:"accordion__content"},(0,n.createElement)(o.InnerBlocks,null)))))},save:({attributes:{accordionHeading:e,accordionHeadingLevel:t}})=>{const a="h"+t;return(0,n.createElement)("div",{className:"accordion-item"},(0,n.createElement)(a,{className:"accordion__heading"},(0,n.createElement)("button",{type:"button",className:"accordion__heading-button","aria-expanded":"false"},e,(0,n.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)("path",{d:"M18 9.41L16.59 8L12 12.58L7.41 8L6 9.41L12 15.41L18 9.41Z",fill:"#333333"})))),(0,n.createElement)("div",{className:"accordion__body"},(0,n.createElement)("div",{className:"accordion__content"},(0,n.createElement)(o.InnerBlocks.Content,null))))}})}},t={};function a(e){var o=t[e];if(void 0!==o)return o.exports;var r=t[e]={exports:{}};return n[e](r,r.exports,a),r.exports}a.m=n,e=[],a.O=(n,t,o,r)=>{if(!t){var c=1/0;for(d=0;d<e.length;d++){for(var[t,o,r]=e[d],l=!0,i=0;i<t.length;i++)(!1&r||c>=r)&&Object.keys(a.O).every((e=>a.O[e](t[i])))?t.splice(i--,1):(l=!1,r<c&&(c=r));if(l){e.splice(d--,1);var s=o();void 0!==s&&(n=s)}}return n}r=r||0;for(var d=e.length;d>0&&e[d-1][2]>r;d--)e[d]=e[d-1];e[d]=[t,o,r]},a.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={807:0,471:0};a.O.j=n=>0===e[n];var n=(n,t)=>{var o,r,[c,l,i]=t,s=0;if(c.some((n=>0!==e[n]))){for(o in l)a.o(l,o)&&(a.m[o]=l[o]);if(i)var d=i(a)}for(n&&n(t);s<c.length;s++)r=c[s],a.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return a.O(d)},t=globalThis.webpackChunkucla_wordpress_plugin=globalThis.webpackChunkucla_wordpress_plugin||[];t.forEach(n.bind(null,0)),t.push=n.bind(null,t.push.bind(t))})();var o=a.O(void 0,[471],(()=>a(573)));o=a.O(o)})();