// Enregistrement des blocs built-in. Importé une seule fois depuis le barrel
// principal pour garantir que les types sont disponibles avant utilisation.

import { registerBlock } from '../blockRegistry.js';
import Paragraph from './Paragraph.js';
import HeadingList from './Heading.js';
import BulletItem from './BulletList.js';
import NumberedItem from './NumberedList.js';
import Quote from './Quote.js';
import Code from './Code.js';
import Divider from './Divider.js';
import Checklist from './Checklist.js';
import ImageBlock from './Image.client.js';

let registered = false;

export function registerBuiltInBlocks() {
  if (registered) return;
  registered = true;
  registerBlock(Paragraph);
  HeadingList.forEach(registerBlock);
  registerBlock(BulletItem);
  registerBlock(NumberedItem);
  registerBlock(Checklist);
  registerBlock(Quote);
  registerBlock(Code);
  registerBlock(Divider);
  registerBlock(ImageBlock);
}
