<?php

namespace Database\Seeders\Tenant;

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

class AutoGrabListingSourcesSettingSeeder 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' => 'DMS vehicle sync',
                'group' => 'AutoGrab',
                'name' => 'Listing sources',
                'config_key' => 'stock-autograb-listing-sources',
                'type' => 'string',
                'value' => '',
                'description' => 'Comma-separated list of listing sources to import (e.g. aoutotrader.co.uk,motors.co.uk). Leave empty to import all.',
            ],
        ];
    }
}
