// two_column — the only container block. Holds two ordered arrays of sub-blocks
// (`left`, `right`). The sub-block arrays are validated by validateBlocks, which
// also enforces the one-level nesting cap (a column may not contain another
// container). This schema only guards the prop shape; the slot arrays default to
// empty when absent.
const { registerBlock } = require('../registry')
const { onlyKeys } = require('../propHelpers')

registerBlock({
  type: 'two_column',
  version: 1,
  cacheTTL: null,
  container: true,
  containerSlots: ['left', 'right'],
  schema(props) {
    // Slot array contents are validated by validateBlocks' container handling;
    // here we only reject stray props.
    return onlyKeys(props, ['left', 'right'])
  },
})
