(()=>{"use strict";const e=window.wp.blocks,o=window.wp.blockEditor,t=window.wp.i18n,r=JSON.parse('{"UU":"gateway/row-group"}'),a=window.ReactJSXRuntime,s=[["gateway/row",{}]];(0,e.registerBlockType)(r.UU,{edit:({context:e})=>{const r=e["gateway/totalCount"]??0,c=(0,o.useBlockProps)({className:"gateway-row-group"});return(0,a.jsxs)("div",{...c,children:[(0,a.jsx)("p",{className:"gateway-row-group__preview-note",children:r>0?`${r} record(s) — live rows render on the frontend`:(0,t.__)("Configure a collection in the Grid settings to load records.","gateway")}),(0,a.jsx)(o.InnerBlocks,{allowedBlocks:["gateway/row"],template:s,templateLock:!1})]})},save:()=>{const e=o.useBlockProps.save({className:"gateway-row-group"});return(0,a.jsxs)("div",{...e,role:"rowgroup",children:[(0,a.jsx)("template",{"data-wp-each--record":"state.records","data-wp-each-key":"context.record.id",children:(0,a.jsx)(o.InnerBlocks.Content,{})}),(0,a.jsx)("p",{className:"gateway-row-group__empty","data-wp-bind--hidden":"state.hasRecords",children:(0,t.__)("No records match the current filter.","gateway")})]})}})})();