<?php
/**
 * _             _       _
 * | |____      _| | __ _| |__
 * | '_ \ \ /\ / / |/ _` | '_ \
 * | |_) \ V  V /| | (_| | |_) |
 * |_.__/ \_/\_/ |_|\__,_|_.__/.
 *
 * @author    Bwlab di Luigi Massa <info@bwlab.it>
 * @copyright since 2014 Bwlab
 * @license   proprietary
 */

declare(strict_types=1);

namespace Bwlab\Withdrawal\Provider;

if (!defined('_PS_VERSION_')) {
    exit;
}


use Bwlab\Withdrawal\Configuration\WithdrawalTextDataConfiguration;
use PrestaShop\PrestaShop\Core\Form\FormDataProviderInterface;

class WithdrawalConfigurationTextFormDataProvider implements FormDataProviderInterface
{
    public function __construct(
        private readonly WithdrawalTextDataConfiguration $configuration,
    ) {
    }

    public function getData(): array
    {
        return $this->configuration->getConfiguration();
    }

    public function setData(array $data): array
    {
        return $this->configuration->updateConfiguration($data);
    }
}
