<?php
/**
 * @package   Essentials YOOtheme Pro 2.2.16 build 0813.1608
 * @author    ZOOlanders https://www.zoolanders.com
 * @copyright Copyright (C) Joolanders, SL
 * @license   http://www.gnu.org/licenses/gpl.html GNU/GPL
 */

namespace ZOOlanders\YOOessentials\Source\Provider\YouTube;

use ZOOlanders\YOOessentials\Config\ConfigUpdater;

return [
    'routes' => [
        ['post', YouTubeController::PRESAVE_ENDPOINT, YouTubeController::class . '@presave'],
        ['post', YouTubeController::GET_CHANNELS_ENDPOINT, YouTubeController::class . '@channels'],
        ['post', YouTubeController::GET_PLAYLISTS_ENDPOINT, YouTubeController::class . '@playlists'],
        ['post', YouTubeController::GET_CHANNEL_VIDEOS_ENDPOINT, YouTubeController::class . '@channelVideos'],
        ['post', YouTubeController::GET_CHANNEL_PLAYLISTS_ENDPOINT, YouTubeController::class . '@channelPlaylists'],
        ['post', YouTubeController::GET_PLAYLIST_VIDEOS_ENDPOINT, YouTubeController::class . '@playlistVideos'],
    ],

    'yooessentials-sources' => [
        'youtube' => YouTubeSource::class,
        'youtube_channel' => YouTubeChannelSource::class,
        'youtube_playlist' => YouTubePlaylistSource::class,
    ],

    'extend' => [
        ConfigUpdater::class => function (ConfigUpdater $update) {
            $update->addGlobals(require __DIR__ . '/updates.php');
        },
    ],
];
