<?php

namespace Database\Seeders\Tenant;

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

class CrmForwardingSettingSeeder 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' => 'CRM',
                'section' => 'Integrations',
                'group' => 'CRM Forwarding',
                'name' => 'Send service bookings to CRM integrations',
                'config_key' => 'crm-forward-service-bookings-enabled',
                'type' => 'boolean',
                'value' => true,
                'order' => 1,
                'description' => 'When enabled, confirmed service bookings are forwarded to the enabled CRM '
                    . 'integrations.',
            ],
            [
                'tab' => 'CRM',
                'section' => 'Integrations',
                'group' => 'CRM Forwarding',
                'name' => 'Send reservations to CRM integrations',
                'config_key' => 'crm-forward-reservations-enabled',
                'type' => 'boolean',
                'value' => true,
                'order' => 2,
                'description' => 'When enabled, confirmed reservations are forwarded to the enabled CRM '
                    . 'integrations.',
            ],
        ];
    }
}
