<?php

namespace Database\Seeders\Tenant;

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

class AutoCreateDealershipsSettingSeeder 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' => 'Motors',
                'name' => 'Auto-create dealerships from stock feed',
                'config_key' => 'stock-motors-auto-create-dealerships',
                'type' => 'boolean',
                'value' => false,
                'feature' => 'listing-dealerships',
                'description' => 'Automatically create dealership records from Motors feed data during stock import. Only available for listing-type tenants.',
            ],
        ];
    }
}
