id: user_profile_field
label: User profile field configuration
migration_tags:
  - Drupal 6
  - Drupal 7
  - Configuration
source:
  plugin: profile_field
  constants:
    entity_type: user
process:
  entity_type: 'constants/entity_type'
  field_name:
    -
      plugin: machine_name
      source: name
    -
      plugin: make_unique_entity_field
      length: 30
      entity_type: field_storage_config
      field: field_name
  type:
    plugin: static_map
    source: type
    map:
      checkbox: boolean
      date: datetime
      list: text
      selection: list_string
      textfield: text
      textarea: text_long
      url: link
  settings:
    plugin: profile_field_settings
    source: type
  'settings/allowed_values': options
  cardinality:
    plugin: static_map
    default_value: 1
    source: type
    map:
      list: -1
destination:
  plugin: entity:field_storage_config
