(()=>{"use strict";const e=window.wp.blocks,o=window.wp.i18n,t=window.wp.blockEditor,n=window.wp.components,s=window.wp.data,i=window.ReactJSXRuntime,c=["core/paragraph","core/group","core/post-title","core/post-date","core/post-content","core/post-featured-image","mine-cloudvod/question-section","mine-cloudvod/question-section-title"],l=[["core/post-title",{level:3}]],r=JSON.parse('{"UU":"mine-cloudvod/question-section"}');(0,e.registerBlockType)(r.UU,{edit:function({attributes:e,setAttributes:r}){const{parentPostId:d,isChapter:a}=e,p=(0,t.useBlockProps)();return(0,s.useSelect)((e=>e("core/editor").getCurrentPostId()),[]),(0,i.jsxs)("div",{...p,children:[(0,i.jsx)(t.InspectorControls,{children:(0,i.jsx)(n.PanelBody,{title:(0,o.__)("Section Settings","mine-cloudvod"),initialOpen:!0,children:(0,i.jsx)(n.ToggleControl,{label:(0,o.__)("Is Chapter","mine-cloudvod"),checked:!!a,onChange:e=>r({isChapter:e}),help:(0,o.__)("Mark this section as a chapter.","mine-cloudvod")})})}),(0,i.jsx)("h5",{style:{padding:"1rem"},children:(0,o.__)("Question Sections","mine-cloudvod")}),(0,i.jsx)("div",{className:"mcv-question-section-template",children:(0,i.jsx)(t.InnerBlocks,{allowedBlocks:c,template:l,templateLock:!1,label:(0,o.__)("Section Template","mine-cloudvod")})})]})},save:function(){const e=t.useBlockProps.save();return(0,i.jsx)("div",{...e,children:(0,i.jsx)(t.InnerBlocks.Content,{})})}})})();