!function(){"use strict";!function(){var e=window.wp.i18n,t=window.wp.element,l=window.wp.data,c=window.wp.blocks,n=window.wp.blockEditor,a=window.wp.components,s="function"==typeof n.useInnerBlocksProps?n.useInnerBlocksProps:n.__experimentalUseInnerBlocksProps,o=React.createElement("svg",{viewBox:"0 0 56 56"},React.createElement("g",null,React.createElement("g",null,React.createElement("path",{d:"M14,5h35c0.6,0,1,0.4,1,1v4c0,0.6-0.4,1-1,1H14c-0.6,0-1-0.4-1-1V6C13,5.4,13.4,5,14,5z"}),React.createElement("g",null,React.createElement("path",{d:"M47.5,17.5v5h-32v-5H47.5 M49,15H14c-0.6,0-1,0.4-1,1v8c0,0.6,0.4,1,1,1h35c0.6,0,1-0.4,1-1v-8C50,15.4,49.6,15,49,15 L49,15z"})),React.createElement("rect",{x:"6",y:"5",width:"3",height:"6"})),React.createElement("g",null,React.createElement("path",{d:"M14,31h35c0.6,0,1,0.4,1,1v4c0,0.6-0.4,1-1,1H14c-0.6,0-1-0.4-1-1v-4C13,31.4,13.4,31,14,31z"}),React.createElement("g",null,React.createElement("path",{d:"M47.5,43.5v5h-32v-5H47.5 M49,41H14c-0.6,0-1,0.4-1,1v8c0,0.6,0.4,1,1,1h35c0.6,0,1-0.4,1-1v-8C50,41.4,49.6,41,49,41 L49,41z"})),React.createElement("rect",{x:"6",y:"31",width:"3",height:"6"})))),r=[{attributes:{dtWidth:{type:"number"}},supports:{anchor:!0,className:!1},save:()=>{const e=n.useBlockProps.save({className:"swell-block-dl"});return React.createElement("dl",e,React.createElement(n.InnerBlocks.Content,null))}}];const d=["loos/dt","loos/dd"],i=[["loos/dt"],["loos/dd"],["loos/dt"],["loos/dd"]];(0,c.registerBlockType)("loos/dl",{title:(0,e.__)("説明リスト(DL)","swell"),description:(0,e.__)("説明リストを簡単に使用できます。","swell"),icon:o,styles:[{name:"default",label:(0,e.__)("デフォルト","swell"),isDefault:!0},{name:"border",label:(0,e.__)("左に線","swell")},{name:"float",label:(0,e.__)("横並び","swell")},{name:"vtabel",label:(0,e.__)("縦並び表","swell")}],edit:({attributes:c,setAttributes:o,clientId:r})=>{const{dtWidth:m}=c,w=-1!==(c.className||"").indexOf("is-style-float");(0,t.useEffect)((()=>{w||o({dtWidth:void 0})}),[w]);const u=(0,l.useSelect)((e=>e("core/block-editor").getBlocks(r)),[r]),{updateBlockAttributes:p}=(0,l.useDispatch)("core/block-editor");(0,t.useEffect)((()=>{u.forEach((e=>{p(e.clientId,{dtWidth:m})}))}),[m,u]);const h=(0,n.useBlockProps)({className:"swell-block-dl swl-inner-blocks",style:m?{"--swl-dt-width":m+2.5+"em"}:null}),E=s({},{allowedBlocks:d,template:i,templateLock:!1,renderAppender:n.InnerBlocks.ButtonBlockAppender});return React.createElement(React.Fragment,null,w&&React.createElement(n.InspectorControls,null,React.createElement(a.PanelBody,{title:(0,e.__)("DTの横幅","swell")},React.createElement(a.RangeControl,{label:(0,e.__)("※ em単位","swell"),value:m,onChange:e=>{o({dtWidth:e})},min:1,max:12,step:1,allowReset:!0}))),React.createElement("div",h,React.createElement("div",{className:"swl-parentSelector"},(0,e.__)("親ブロックを選択","swell")),E.children))},save:({attributes:e})=>{const{dtWidth:t}=e,l=n.useBlockProps.save({className:"swell-block-dl",style:t?{"--swl-dt-width":t+2.5+"em"}:null});return React.createElement("dl",l,React.createElement(n.InnerBlocks.Content,null))},deprecated:r})}()}();