<?php

namespace Database\Seeders\Tenant;

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

class VehicleRegistrationUniqueSettingSeeder 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' => 'Vehicles',
                'name' => 'Require unique registration numbers',
                'config_key' => 'vehicle-registration-number-unique',
                'type' => 'boolean',
                'value' => true,
                'description' => 'When enabled the registration number must be unique across vehicles when adding or '
                    . 'editing. Disable to skip the uniqueness check and allow duplicate registration numbers.',
                'order' => 11,
            ],
        ];
    }
}
