<?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\Csv;

use YOOtheme\Builder;
use ZOOlanders\YOOessentials\Source\QueryArgsTransform;

return [
    'routes' => [['post', CsvController::PRESAVE_ENDPOINT, CsvController::class . '@presave']],

    'yooessentials-sources' => [
        'csv' => CsvSource::class,
    ],

    'extend' => [
        Builder::class => function (Builder $builder, $app) {
            $transform = new QueryArgsTransform('fileCSV');
            $builder->addTransform('preload', $transform);
        },
    ],
];
