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

return [
  'name' => 'instagram', 
  'title' => 'Instagram', 
  'description' => 'Source based on Instagram Business or Creator account', 
  'group' => 'Social Media', 
  'icon' => $filter->apply('url', '~yooessentials_url/modules/source/providers/Instagram/icon.svg', $file), 
  'endpoints' => [
    'presave' => 'yooessentials/source/instagram'
  ], 
  'fields' => [
    'name' => [
      'label' => 'Name', 
      'description' => 'A name to identify this source.', 
      'attrs' => [
        'autofocus' => true, 
        'placeholder' => 'Instagram'
      ]
    ], 
    'description' => [
      'label' => 'Description', 
      'description' => 'A short description of this source.'
    ], 
    'account' => [
      'label' => 'Account', 
      'type' => 'yooessentials-connected-auth', 
      'connections' => [
        'instagram' => ['instagram_business_basic'], 
        'facebook' => ['instagram_basic', 'pages_show_list', 'pages_read_engagement', 'business_management']
      ], 
      'description' => 'The Instagram Business or Creator account from which to create the source.'
    ], 
    'page_id' => [
      'label' => 'Page', 
      'description' => 'The Page from which to create the source.', 
      'type' => 'yooessentials-select-dropdown-async', 
      'endpoint' => 'yooessentials/source/instagram/pages', 
      'watch' => 'account'
    ], 
    'cache_default' => $config->get('yooessentials.source.fields.cache_default_limited')
  ]
];
