<?php

namespace Database\Seeders\Tenant;

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

class ExcludeSoldVehiclesSettingSeeder 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' => 'General',
                'group' => 'Sold Vehicles',
                'name' => 'Exclude sold vehicles from listings',
                'config_key' => 'filter-results-exclude-sold-vehicles',
                'min_tier' => 'standard',
                'type' => 'boolean',
                'value' => false,
                'description' => 'When enabled, sold vehicles are hidden from the admin vehicle'
                    . ' list and overview counts by default, and are only shown when the "Sold"'
                    . ' status filter is selected (the same way archived vehicles behave). Dashboard'
                    . ' reporting figures (vehicles published, average inventory and the inventory'
                    . ' graph) also exclude sold vehicles from the point this is enabled.',
            ],
        ];
    }
}
