(()=>{"use strict";const e=window.React,t=window.wp.blocks,l=(window.wp.i18n,window.wp.blockEditor),n=window.wp.components,o=window.wp.data,c=["ucla-wordpress-plugin/accordion-item"],r=[["ucla-wordpress-plugin/accordion-item",{}],["ucla-wordpress-plugin/accordion-item",{}]],i=JSON.parse('{"UU":"ucla-wordpress-plugin/accordion"}');(0,t.registerBlockType)(i.UU,{icon:{src:(0,e.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false"},(0,e.createElement)("rect",{x:"2",y:"2",width:"1.5",height:"20",fill:"#333333"}),(0,e.createElement)("rect",{x:"21",y:"2",width:"1.5",height:"20",fill:"#333333"}),(0,e.createElement)("rect",{x:"2",y:"3",width:"1.5",height:"20.5",transform:"rotate(-90 2 3)",fill:"#333333"}),(0,e.createElement)("rect",{x:"2",y:"22",width:"1.5",height:"20.5",transform:"rotate(-90 2 22)",fill:"#333333"}),(0,e.createElement)("rect",{x:"2",y:"15",width:"1.5",height:"20.5",transform:"rotate(-90 2 15)",fill:"#333333"}),(0,e.createElement)("rect",{x:"2",y:"9",width:"1.5",height:"20.5",transform:"rotate(-90 2 9)",fill:"#333333"}))},edit:({attributes:t,setAttributes:i,clientId:a})=>{let{isMultiOpen:s}=t;const{blockCount:d}=(0,o.useSelect)((e=>({blockCount:e("core/block-editor").getBlockCount(a)}))),w=(0,l.useBlockProps)({className:"accordion"+(s?"  is-multiselect":"")});return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(l.InspectorControls,null,(0,e.createElement)(n.PanelBody,null,(0,e.createElement)(n.ToggleControl,{label:"Multi-Open Accordion",help:s?"Can open multiple accordions at once":"One accordion can be open at a time",checked:s,onChange:e=>{i({isMultiOpen:e})}}))),(0,e.createElement)("div",{...w},(0,e.createElement)(l.InnerBlocks,{allowedBlocks:c,template:r})))},save:({attributes:{isMultiOpen:t}})=>{const n=l.useBlockProps.save({className:"accordion"+(t?"  is-multiselect":"")});return(0,e.createElement)("div",{...n},(0,e.createElement)(l.InnerBlocks.Content,null))}})})();