<?php
//Obfuscated by YAK Pro - Php Obfuscator 2.0.13 at 2025-06-18 09:19:14
 namespace App\Exports; use App\LeaveHistory; use Maatwebsite\Excel\Concerns\FromCollection; use Maatwebsite\Excel\Concerns\WithHeadings; use Maatwebsite\Excel\Concerns\WithMapping; use Maatwebsite\Excel\Concerns\ShouldAutoSize; use Maatwebsite\Excel\Concerns\WithTitle; use Maatwebsite\Excel\Concerns\WithStyles; use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet; use Maatwebsite\Excel\Concerns\WithEvents; use Maatwebsite\Excel\Events\AfterSheet; use PhpOffice\PhpSpreadsheet\Style\Alignment; use PhpOffice\PhpSpreadsheet\Style\Border; class LeaveHistoriesExport implements FromCollection, WithHeadings, WithMapping, ShouldAutoSize, WithTitle, WithStyles, WithEvents { public function title() : string { return "\x4c\x65\x61\x76\x65\110\151\163\x74\157\162\x69\145\163"; } public function collection() { return LeaveHistory::with(["\145\x6d\160\154\157\x79\145\x65", "\x6c\x65\x61\166\x65\124\171\160\x65"])->get(); } public function headings() : array { return ["\347\244\xbe\345\223\241\xe7\225\xaa\xe5\x8f\xb7", "\xe9\226\x8b\xe5\247\x8b\346\227\245", "\347\xb5\x82\344\272\x86\xe6\227\xa5", "\344\274\x91\xe8\201\267\345\x90\215", "\xe3\x83\xa1\xe3\x83\xa2"]; } public function map($Xu_y4) : array { return [$Xu_y4->employee ? $Xu_y4->employee->employee_code : "\116\57\x41", $this->dateFormat($Xu_y4->from_date, "\131\57\155\x2f\144"), $this->dateFormat($Xu_y4->to_date, "\131\57\155\x2f\144"), $Xu_y4->leaveType ? $Xu_y4->leaveType->name : '', $Xu_y4->description]; } public function styles(Worksheet $ku_16) { return [1 => ["\x61\154\151\x67\x6e\x6d\x65\x6e\x74" => ["\x68\157\x72\151\172\x6f\x6e\164\141\x6c" => Alignment::HORIZONTAL_CENTER, "\166\x65\x72\x74\151\143\141\x6c" => Alignment::VERTICAL_CENTER]], "\x41\x31\x3a\x45" . $ku_16->getHighestRow() => ["\142\157\162\x64\145\x72\163" => ["\141\x6c\154\x42\x6f\x72\x64\x65\x72\163" => ["\142\157\162\x64\x65\162\123\164\171\x6c\x65" => Border::BORDER_THIN]]], "\101\x32\72\x41" . $ku_16->getHighestRow() => ["\x61\154\x69\147\x6e\x6d\x65\156\x74" => ["\x68\157\x72\151\172\x6f\x6e\164\x61\x6c" => Alignment::HORIZONTAL_LEFT, "\x76\x65\x72\164\151\143\x61\154" => Alignment::VERTICAL_CENTER]], "\102\61\x3a\102" . $ku_16->getHighestRow() => ["\x61\x6c\x69\x67\156\155\145\156\164" => ["\150\157\x72\x69\x7a\x6f\x6e\164\x61\154" => Alignment::HORIZONTAL_CENTER, "\166\x65\x72\164\151\x63\x61\x6c" => Alignment::VERTICAL_CENTER]], "\x43\x31\72\x43" . $ku_16->getHighestRow() => ["\141\154\x69\147\156\155\x65\156\x74" => ["\150\157\x72\x69\x7a\157\156\x74\x61\154" => Alignment::HORIZONTAL_CENTER, "\x76\145\162\164\x69\143\x61\154" => Alignment::VERTICAL_CENTER]]]; } public function registerEvents() : array { return [AfterSheet::class => function (AfterSheet $vWNcz) { $vWNcz->sheet->freezePane("\101\x32"); }]; } private function dateFormat($VQsnb, $EHDPG = "\x6e\57\x6a\57\x59") { if (!empty($VQsnb)) { goto kLF7N; } return ''; kLF7N: $vMY02 = is_string($VQsnb) ? $VQsnb : $VQsnb->format("\x59\55\155\55\x64"); return date($EHDPG, strtotime($vMY02)); } }