<?php

namespace Database\Seeders\Tenant;

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

class IvendiMaxAdvanceSettingSeeder 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' => 'iVendi',
                'name' => 'iVendi Max Advance',
                'config_key' => 'finance-ivendi-max-advance',
                'type' => 'int',
                'value' => 0,
                'min_tier' => 'standard',
                'description' => 'Maximum amount iVendi will advance on a single quote. The calculator '
                    . 'uses this as a hard cap on (price - deposit); when the balance exceeds it, '
                    . 'quotes will fail. Set 0 for no cap. Note that interest costs factor in too, so '
                    . 'leave headroom against the lender ceiling and raise the default deposit on '
                    . 'high-cost vehicles to keep quotes returning.',
            ],
        ];
    }
}
