<?php

namespace App\Exports;

use Maatwebsite\Excel\Concerns\FromCollection;
use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\FromArray;
use Maatwebsite\Excel\Concerns\WithHeadings;


class TaxReport implements FromArray, WithHeadings
{
    
    protected $tax;
    protected $headings;
    public function __construct(array $tax)
    {
        $this->tax = $tax;
    }

    /**
    * @return array
    */
    public function array(): array
    {
        return $this->tax;
    }

    public function headings(): array
    {
        return [
            'Employee ID',
            'Employee Name',
            'Basic Pay',
            'Gross Earning Calculation',
            'Net Taxable Calculation',
            'Tax Paid',
            'Total Tax Calculation',
            'Tax State',
            'Tax Number'
        ];

    }
}
