<?php

namespace Database\Seeders\Tenant;

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

class AutoTraderMakeBasedAssignmentSettingSeeder 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 pull from AutoTrader to website',
                'name' => 'Assign co-located stock by make',
                'config_key' => 'autotrader-make-based-assignment',
                'type' => 'boolean',
                'min_tier' => 'standard',
                'value' => false,
                'description' => 'When several dealerships share one AutoTrader advertiser ID, assign each '
                    . 'imported vehicle to the dealership whose franchise matches the vehicle make. Unmatched '
                    . 'stock falls back to the dealership flagged as the AutoTrader catchall.',
            ],
        ];
    }
}
