# Schema for the configuration files of the group module.

group.settings:
  type: 'config_object'
  label: 'Group settings'
  mapping:
    use_admin_theme:
      type: 'boolean'
      label: 'Use admin theme when editing or creating groups'

group.type.*:
  type: 'config_entity'
  label: 'Group type'
  mapping:
    id:
      type: 'string'
      label: 'Machine-readable name'
    label:
      type: 'label'
      label: 'Label'
    description:
      type: 'text'
      label: 'Description'
    new_revision:
      type: 'boolean'
      label: 'Whether a new revision should be created by default'
    creator_membership:
      type: 'boolean'
      label: 'The group creator receives a membership'
    creator_wizard:
      type: 'boolean'
      label: 'The group creator must immediately complete their membership.'
    creator_roles:
      type: 'sequence'
      label: 'Group creator roles'
      sequence:
        type: 'string'
        label: 'Group role ID'

group_content_enabler.config.group_cardinality:
  type: 'integer'
  label: 'Group cardinality'

group_content_enabler.config.entity_cardinality:
  type: 'integer'
  label: 'Entity cardinality'

group_content_enabler.config.use_creation_wizard:
  type: 'boolean'
  label: 'Use creation wizard'

# Follows the pattern group.role.GROUP_TYPE_ID-GROUP_ROLE_ID.
group.role.*:
  type: 'config_entity'
  label: 'Group role'
  mapping:
    id:
      type: 'string'
      label: 'Machine-readable name'
    label:
      type: 'label'
      label: 'Label'
    weight:
      type: 'integer'
      label: 'Weight'
    internal:
      type: 'boolean'
      label: 'Group role is used internally'
    audience:
      type: 'string'
      label: 'Audience'
    group_type:
      type: 'string'
      label: 'Group type ID'
    permissions_ui:
      type: 'boolean'
      label: 'Show this role in the default permissions UI'
    permissions:
      type: 'sequence'
      label: 'Permissions'
      sequence:
        type: 'string'
        label: 'Group permission'

group_content_type:
  type: 'config_entity'
  label: 'Group content type'
  mapping:
    id:
      type: 'string'
      label: 'Machine-readable name'
    label:
      type: 'label'
      label: 'Label'
    description:
      type: 'text'
      label: 'Description'
    group_type:
      type: 'string'
      label: 'Group type ID'
    content_plugin:
      type: 'string'
      label: 'Group content plugin ID'
    plugin_config:
      type: 'sequence'
      label: 'Plugin configuration'
      sequence:
        type: 'group_content_enabler.config.[%key]'

# Follows the pattern group.content_type.GROUP_TYPE_ID-PLUGIN_ID.
# Follows the pattern group.content_type.GROUP_TYPE_ID-PLUGIN_ID-DERIVATIVE_ID.
group.content_type.*:
  type: 'group_content_type'
  label: 'Group content type'

entity_reference_selection.group_type:group_role:
  type: 'entity_reference_selection'
  mapping:
    group_type_id:
      type: 'string'
      label: 'The group type to check for available roles.'
