<?php

namespace App\Imports;

use App\Models\Product;
use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\ToCollection;
use Maatwebsite\Excel\Concerns\WithHeadingRow;

class PurchaseOrderImport implements ToCollection, WithHeadingRow
{
    public function collection(Collection $rows)
    {
        // We just return the collection to be handled by the Livewire component
        // This allows us to maintain state and perform validation/creation within the component context
        return $rows;
    }
}
