<?php

namespace Database\Seeders\Tenant;

use App\Facades\Settings;
use Illuminate\Database\Seeder;

class AutoTraderRemoveUnmatchedVehiclesSetting extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        collect($this->data())
            ->each(fn ($setting) => Settings::make($setting));
    }

    private function data(): array
    {
        return [
            [
                'tab' => 'Automotive',
                'section' => 'Autotrader',
                'group' => 'Stock push from website to Autotrader',
                'name' => 'Remove vehicles that no longer match the sales channel rules',
                'config_key' => 'auto-trader-hub-remove-unmatched-vehicles',
                'type' => 'boolean',
                'value' => false,
                'description' => 'When a vehicle stops matching the Autotrader sales channel rules '
                    . '(for example its VRM is changed to an excluded value), remove it from Autotrader '
                    . 'instead of leaving the previously exported listing in place.',
                'order' => 35,
            ],
        ];
    }
}
