<?php

namespace Database\Seeders\Tenant;

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

class SrpFeaturedVehicleSettingSeeder extends Seeder
{
    public function run(): void
    {
        collect($this->data())
            ->each(fn ($setting) => Settings::make($setting));
    }

    private function data(): array
    {
        return [
            [
                'tab' => 'Automotive',
                'section' => 'Filter',
                'group' => 'General',
                'name' => 'SRP Featured Vehicles',
                'config_key' => 'automotive-srp-featured-vehicles',
                'type' => 'boolean',
                'min_tier' => 'standard',
                'value' => false,
                'order' => 9,
                'description' => 'When enabled, vehicles marked as SRP Featured are pinned to the top of page 1 on the SRP.',
            ],
            [
                'tab' => 'Automotive',
                'section' => 'Filter',
                'group' => 'General',
                'name' => 'Max SRP Featured Vehicles',
                'config_key' => 'automotive-srp-featured-max',
                'type' => 'integer',
                'min_tier' => 'standard',
                'value' => 0,
                'order' => 10,
                'description' => 'Maximum number of vehicles pinned as SRP Featured on page 1. Max 5.',
            ],
        ];
    }
}
