# Schema for the configuration files of the Content Block module.

block_content.type.*:
  type: config_entity
  label: 'Block type settings'
  mapping:
    id:
      type: machine_name
      label: 'ID'
    label:
      type: required_label
      label: 'Label'
    revision:
      type: boolean
      label: 'Whether a new revision should be created by default'
    description:
      type: text
      label: 'Description'
      nullable: true
      constraints:
        NotBlank:
          allowNull: true
  constraints:
    FullyValidatable: ~

# @see \Drupal\block_content\Plugin\Block\BlockContentBlock
# @eee \Drupal\block_content\Plugin\Derivative\BlockContent
block.settings.block_content:*:
  type: block_settings
  label: 'Content block'
  constraints:
    FullyValidatable: ~
  mapping:
    # @see \Drupal\block_content\Plugin\Block\BlockContentBlock::defaultConfiguration()
    # @todo Deprecate this in https://www.drupal.org/project/drupal/issues/3426302
    status:
      type: boolean
      label: 'Status'
    # @todo Deprecate this in https://www.drupal.org/project/drupal/issues/3426302
    info:
      type: label
      label: 'Admin info'
    view_mode:
      type: string
      label: 'View mode'
      constraints:
        ConfigExists:
          prefix: core.entity_view_mode.block_content.
