<?php // $file = /home/bluedoor/www/dev/wp-content/plugins/yooessentials/modules/form/actions/Mailchimp/member-remove.json

return [
  'name' => 'mailchimp-member-remove', 
  'title' => 'Remove member from a list', 
  'description' => 'Archive or Delete a Mailchimp audience member', 
  'icon' => $filter->apply('url', '~yooessentials_url/modules/form/actions/Mailchimp/icon.svg', $file), 
  'group' => 'Misc', 
  'collection' => 'Mailchimp', 
  'fields' => [
    'auth' => [
      'label' => 'Account', 
      'type' => 'yooessentials-connected-auth', 
      'connections' => [
        'mailchimp' => [], 
        'mailchimp-apikey' => []
      ], 
      'description' => 'Connect to your Mailchimp Account or set an API Key for authentication.'
    ], 
    'list' => [
      'label' => 'Audience', 
      'type' => 'yooessentials-select-dropdown-async', 
      'description' => 'The audience from which to remove the member.', 
      'endpoint' => 'yooessentials/form/actions/mailchimp/lists', 
      'placeholder' => 'Select a list', 
      'autoSelect' => true, 
      'enable' => 'auth'
    ], 
    'member_email_address' => [
      'label' => 'Email Address', 
      'description' => 'Member\'s email address.', 
      'source' => true, 
      'enable' => 'list'
    ], 
    'delete' => [
      'text' => 'Delete instead of Archive', 
      'type' => 'checkbox', 
      'enable' => 'list'
    ], 
    '_info_delete' => [
      'text' => 'Delete instead of Archive', 
      'content' => 'The member will be removed from the list and all it personally identifiable information will be deleted. This will make it impossible to re-import the list member.', 
      'type' => 'yooessentials-info', 
      'show' => 'delete'
    ], 
    'name' => $config->get('yooessentials.form.fields.action_name'), 
    'status' => $config->get('yooessentials.form.fields.action_status'), 
    'conditions' => $config->get('yooessentials.form.fields.action_conditions')
  ], 
  'fieldset' => [
    'default' => [
      'type' => 'tabs', 
      'fields' => [[
          'title' => 'Action', 
          'fields' => ['auth', 'list', 'member_email_address', 'delete', '_info_delete']
        ], [
          'title' => 'Advanced', 
          'fields' => ['name', 'status', 'conditions']
        ]]
    ]
  ]
];
