<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;

class WithdrawMethodSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {

        $methods = [
            [
                'name' => 'Bank Transfer',
                'image' => '/assets/admin/images/bank.jpg',
                'min' => 50,
                'max' => 5000,
                'percent_charge' => 2,
                'fixed_charge' => 5,
                'currency' => 'USD',
                'instructions' => 'Bank Transfer Instructions',
                'description' => 'Bank Transfer Description',
                'fields' => [
                    [
                        'label' => 'Bank Name',
                        'field_type' => 'text',
                        'required' => true,
                        'order' => 1,
                    ],
                    [
                        'label' => 'Account Number',
                        'field_type' => 'text',
                        'required' => true,
                        'order' => 2,
                    ],
                    [
                        'label' => 'Account Name',
                        'field_type' => 'text',
                        'required' => true,
                        'order' => 3,
                    ],
                    [
                        'label' => 'Routing Number',
                        'field_type' => 'text',
                        'required' => true,
                        'order' => 4,
                    ],
                    [
                        'label' => 'Swift Code',
                        'field_type' => 'text',
                        'required' => true,
                        'order' => 5,
                    ],
                ],
                'status' => 'active',
            ],
            [
                'name' => 'Bkash',
                'image' => '/assets/admin/images/bkash.png',
                'min' => 50,
                'max' => 5000,
                'percent_charge' => 2,
                'fixed_charge' => 5,
                'currency' => 'USD',
                'instructions' => 'Bkash Instructions',
                'description' => 'Bkash Description',
                'fields' => [
                    [
                        'label' => 'Bkash Number',
                        'field_type' => 'number',
                        'required' => true,
                        'order' => 1,
                    ],
                ],
                'status' => 'active',
            ],
        ];

        foreach ($methods as $method) {
            \App\Models\WithdrawMethod::create($method);
        }
    }
}
