!function(){"use strict";!function(){var e=window.wp.i18n,t=window.wp.blocks,a=window.wp.blockEditor,c=window.wp.components,n="function"==typeof a.useInnerBlocksProps?a.useInnerBlocksProps:a.__experimentalUseInnerBlocksProps,l=JSON.parse('{"u2":"loos/accordion-item"}'),s=React.createElement("svg",{viewBox:"0 0 56 56"},React.createElement("path",{d:"M51.5,18h-47C3.6,18,3,18.6,3,19.5v17C3,37.4,3.6,38,4.5,38h47c0.9,0,1.5-0.6,1.5-1.5v-17C53,18.6,52.4,18,51.5,18z M50,21 v14H6V21H50z"}),React.createElement("polygon",{points:"47,26.8 44.2,26.8 44.2,24 41.8,24 41.8,26.8 39,26.8 39,29.2 41.8,29.2 41.8,32 44.2,32 44.2,29.2 47,29.2 \t"}));const o=[["core/paragraph"]],i="swell-block-accordion";(0,t.registerBlockType)(l.u2,{title:(0,e.__)("項目","swell"),icon:s,edit:({attributes:t,setAttributes:l})=>{const{isDefultOpen:s}=t,r=(0,a.useBlockProps)({className:`${i}__item`,"aria-expanded":!0}),d=n({className:`${i}__body swl-inner-blocks is-nested-inner swl-has-margin--s`},{template:o});return React.createElement(React.Fragment,null,React.createElement(a.InspectorControls,null,React.createElement(c.PanelBody,{title:(0,e.__)("アコーディオン設定","swell")},React.createElement(c.ToggleControl,{label:(0,e.__)("デフォルトで開いた状態にする","swell"),checked:s,onChange:e=>{l({isDefultOpen:e})}}))),React.createElement("div",r,React.createElement("div",{className:`${i}__title`},React.createElement(a.RichText,{tagName:"div",className:`${i}__label`,placeholder:(0,e.__)("テキストを入力…","swell"),value:t.title,onChange:e=>l({title:e})}),React.createElement("span",{className:`${i}__icon c-switchIconBtn`,"aria-hidden":"false","data-opened":"true"},React.createElement("i",{className:`__icon--closed ${t.iconClosed}`}),React.createElement("i",{className:`__icon--opened ${t.iconOpened}`}))),React.createElement("div",d)))},save:({attributes:e})=>{const{isDefultOpen:t}=e,c=a.useBlockProps.save({className:`${i}__item`,"aria-expanded":!!t});return React.createElement("div",c,React.createElement("div",{className:`${i}__title`,"data-onclick":"toggleAccordion"},React.createElement("span",{className:`${i}__label`},React.createElement(a.RichText.Content,{value:e.title})),React.createElement("span",{className:`${i}__icon c-switchIconBtn`,"aria-hidden":"true","data-opened":t?"true":"false"},React.createElement("i",{className:`__icon--closed ${e.iconClosed}`}),React.createElement("i",{className:`__icon--opened ${e.iconOpened}`}))),React.createElement("div",{className:`${i}__body`,"aria-hidden":t?"false":"true"},React.createElement(a.InnerBlocks.Content,null)))}})}()}();