<?php

namespace App\Exports;

use App\Models\User;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\FromArray;
use Maatwebsite\Excel\Concerns\WithHeadings;


class PayrollExport implements FromArray, WithHeadings
{
    protected $data;
    protected $headings;

    public function __construct(array $data)
    {
        $this->data = $data;
    }

    /**
     * @return array
     */
    public function array(): array
    {
        return $this->data;
    }
    public function headings(): array
    {
        return [
            'Employee ID',
            'Payroll ID',
            'Name',
            'Department',
            'Employment Type',
            'PayGroup',
            'Payment Status',
            'Basic Salary',
            'Allowances',
            'Bonuses',
            'Deductions',
            'Non Statutory Deductions',
            'Pension(employee)',
            'Pension(employer)',
            'ECS',
            'ITF',
            'CRA',
            'Tax',
            'Gross Pay',
            'Payable Amount',
            'Bank Name',
            'Bank Code',
            'Account Number',
            'Account Name',
        ];

    }
}
