<?php

namespace Database\Seeders;

use App\Models\PaymentMethod;
use App\Services\Payment\PaymentMethodReserve;
use Illuminate\Database\Seeder;

class PaymentMethodSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        PaymentMethodReserve::make();

        // manual payment methods
        PaymentMethod::query()->create([
            'name' => 'Bank Transfer',
            'slug' => 'bank-transfer',
            'min' => 10,
            'max' => 1000,
            'percent_charge' => 5,
            'fixed_charge' => 0,
            'status' => 'active',
            'image' => '/gateway-images/bank-transfer.png',
            'supported_currencies' => ['USD'],
            'is_test' => false,
            'type' => 'manual',
            'pay_instructions' => '<p>Send money through below information as bank transfer. </p><p>Name: Jhone Doe </p><p>Account: 100224....XXXX.... </p><p>Branch: New York </p><p>Swift Code: 33344</p>',
            'meta' => [
                [
                    'label' => 'Method Name',
                    'field_type' => 'text',
                    'required' => '1',
                    'order' => '0',
                ],
                [
                    'label' => 'Account Number',
                    'field_type' => 'text',
                    'required' => '1',
                    'order' => '1',
                ],
                [
                    'label' => 'Screen Shot',
                    'field_type' => 'image',
                    'required' => '1',
                    'order' => '2',
                ],
            ],
        ]);
    }
}
