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

return [
  'name' => 'youtube_playlist', 
  'title' => 'YouTube My Playlist', 
  'description' => 'All videos (Private & Unlisted) from your playlist via oAuth.', 
  'group' => 'Social Media', 
  'collection' => 'YouTube', 
  'icon' => $filter->apply('url', '~yooessentials_url/modules/source/providers/YouTube/icon.svg', $file), 
  'endpoints' => [
    'presave' => 'yooessentials/source/youtube'
  ], 
  'fields' => [
    'name' => [
      'label' => 'Name', 
      'description' => 'A name to identify this source.', 
      'attrs' => [
        'autofocus' => true, 
        'placeholder' => 'YouTube My Playlist'
      ]
    ], 
    'account' => [
      'label' => 'Account', 
      'type' => 'yooessentials-connected-auth', 
      'connections' => [
        'google' => ['https://www.googleapis.com/auth/youtube.readonly']
      ], 
      'description' => 'The Google account which to authenticate with.'
    ], 
    'playlist_id' => [
      'label' => 'Playlist', 
      'type' => 'yooessentials-select-dropdown-async', 
      'description' => 'The YouTube Playlist from which to create the source.', 
      'endpoint' => 'yooessentials/source/youtube/playlists', 
      'watch' => 'account'
    ], 
    'cache_default' => $config->get('yooessentials.source.fields.cache_default_limited')
  ]
];
