wp.hooks.addFilter(
  'blocks.registerBlockType',
  'firefly/add-custom-block-attr',
  (settings, name) => {
    if (!settings.attributes) return settings;

    return {
      ...settings,
      attributes: {
        ...settings.attributes,
        firefly_block_id: {
          type: 'string',
          default: ''
        }
      }
    };
  }
);
