<?php

namespace Database\Seeders\Tenant;

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

class MaximumDepositPercentageSettingSeeder 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' => 'Finance',
                'group' => 'General',
                'name' => 'Maximum deposit percentage',
                'config_key' => 'finance-maximum-deposit-percentage',
                'type' => 'int',
                'value' => 80,
                'min_tier' => 'standard',
                'description' => 'Upper limit, as a percentage of vehicle price, used by the front-end '
                    . 'deposit slider/input. Set to the highest deposit percentage allowed across the '
                    . 'finance products offered (e.g. 80 to cover HP, 40 to cap at PCP).',
            ],
        ];
    }
}
