<?php

namespace App\Imports;

use App\Models\PreClaim;
use Illuminate\Contracts\Queue\ShouldQueue;
use Maatwebsite\Excel\Concerns\ToModel;
use Maatwebsite\Excel\Concerns\WithChunkReading;

class PreClaimImport implements ToModel, ShouldQueue, WithChunkReading
{
    public function model(array $row)
    {
        return new PreClaim([
            'name' => $row[0] ?? null,
            // add more fields as per your CSV
        ]);
    }

    public function chunkSize(): int
    {
        return 1000; // process 1000 rows per chunk
    }
}