<?php // $file = /home/bluedoor/www/dev/wp-content/plugins/yooessentials/modules/source/providers/Airtable/config.json

return [
  'name' => 'airtable', 
  'title' => 'Airtable', 
  'description' => 'Source based on Airtable apps.', 
  'group' => 'Structured Data', 
  'icon' => $filter->apply('url', '~yooessentials_url/modules/source/providers/Airtable/icon.svg', $file), 
  'endpoints' => [
    'presave' => 'yooessentials/source/airtable'
  ], 
  'fields' => [
    'name' => [
      'label' => 'Name', 
      'description' => 'A name to identify this source.', 
      'attrs' => [
        'autofocus' => true, 
        'placeholder' => 'Airtable'
      ]
    ], 
    'auth' => [
      'label' => 'Authentication', 
      'type' => 'yooessentials-connected-auth', 
      'connections' => [
        'airtable-access-token' => []
      ], 
      'description' => 'The Airtable authentication which to use for this source. Requires <code>data.records:read</code> and <code>schema.bases:read</code> permissions.'
    ], 
    'base' => [
      'label' => 'Base', 
      'type' => 'yooessentials-select-dropdown-async', 
      'description' => 'The Airtable base which to retrieve the data from.', 
      'watch' => 'auth', 
      'endpoint' => 'yooessentials/source/airtable/bases'
    ], 
    'table' => [
      'label' => 'Table', 
      'type' => 'yooessentials-select-dropdown-async', 
      'description' => 'The Airtable base which to retrieve the data from.', 
      'watch' => 'base', 
      'endpoint' => 'yooessentials/source/airtable/tables'
    ], 
    'cache_default' => $config->get('yooessentials.source.fields.cache_default_limited')
  ]
];
