<?php

namespace Database\Seeders\Tenant;

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

class CapEnrichVrmSettingSeeder 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' => 'Specification / Feature Synchronization',
                'group' => 'CAP',
                'name' => 'Update registration number from CAP/DVLA on lookup',
                'config_key' => 'vehicle-spec-providers-cap-enrich-vrm',
                'type' => 'boolean',
                'value' => true,
                'description' => 'When enabled, a CAP ID lookup sets the vehicle registration number from the '
                    . 'CAP/DVLA response. Disable to stop CAP enrichment overwriting a manually-entered '
                    . 'registration number (e.g. new-plate placeholders).',
                'order' => 31,
            ],
        ];
    }
}
