langcode: en
status: true
dependencies:
  module:
    - eca_base
    - eca_config
    - eca_content
    - eca_user
id: privacy_setting_link
modeller: fallback
label: 'Show link to privacy settings'
version: 1.0.0
weight: 0
events:
  Event_save_config:
    plugin: 'config:save'
    label: 'Save config'
    configuration: {  }
    successors:
      -
        id: Activity_and_1
        condition: Flow_klaro_app
conditions:
  Flow_klaro_app:
    plugin: eca_scalar
    configuration:
      negate: false
      case: false
      left: '[config_name]'
      right: klaro.klaro_app.
      operator: beginswith
      type: value
  Flow_enabled:
    plugin: eca_scalar
    configuration:
      negate: false
      case: false
      left: '[config:status]'
      right: '1'
      operator: equal
      type: value
  Flow_was_disabled:
    plugin: eca_scalar
    configuration:
      case: false
      left: '[config_original:status]'
      right: '1'
      operator: equal
      type: value
      negate: true
  Flow_disabled:
    plugin: eca_entity_field_value
    configuration:
      case: false
      expected_value: '1'
      field_name: enabled
      operator: equal
      type: value
      negate: true
      entity: menulink
  Flow_not_required:
    plugin: eca_scalar
    configuration:
      case: false
      left: '[config:required]'
      right: '1'
      operator: equal
      type: value
      negate: true
gateways: {  }
actions:
  Activity_and_1:
    plugin: eca_void_and_condition
    label: AND
    configuration: {  }
    successors:
      -
        id: Activity_and_2
        condition: Flow_enabled
  Activity_and_2:
    plugin: eca_void_and_condition
    label: AND
    configuration: {  }
    successors:
      -
        id: Activity_and_3
        condition: Flow_was_disabled
  Activity_and_3:
    plugin: eca_switch_account
    label: 'Switch to user 1'
    configuration:
      user_id: '1'
    successors:
      -
        id: Activity_load_menu_link
        condition: Flow_not_required
  Activity_load_menu_link:
    plugin: eca_token_load_entity
    label: 'Load menu link'
    configuration:
      token_name: menulink
      from: properties
      entity_type: menu_link_content
      entity_id: ''
      revision_id: ''
      properties: 'uuid: d7f4f1b2-af94-46b8-ac63-a8a5b14fb0f5'
      langcode: _interface
      latest_revision: false
      unchanged: false
      object: ''
    successors:
      -
        id: Activity_enable_menu_link
        condition: Flow_disabled
  Activity_enable_menu_link:
    plugin: eca_set_field_value
    label: 'Enable menu link'
    configuration:
      field_name: enabled
      field_value: '1'
      method: 'set:clear'
      strip_tags: false
      trim: false
      save_entity: true
      object: menulink
    successors: {  }
