<?php
//Obfuscated by YAK Pro - Php Obfuscator 2.0.13 at 2025-06-18 09:19:15
 namespace App\Exports; use App\LevelHistory; 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 LevelHistoriesExport implements FromCollection, WithHeadings, WithMapping, ShouldAutoSize, WithTitle, WithStyles, WithEvents { public function title() : string { return "\114\x65\166\x65\x6c\110\151\x73\x74\157\162\151\145\x73"; } public function collection() { return LevelHistory::with(["\x65\155\160\154\157\171\x65\145", "\154\x65\166\x65\154"])->get(); } public function headings() : array { return ["\xe7\xa4\276\xe5\223\xa1\347\x95\xaa\345\x8f\267", "\351\226\x8b\xe5\xa7\213\346\227\245", "\xe7\xb5\x82\344\272\x86\346\227\xa5", "\351\x9b\207\347\x94\250\xe5\214\xba\xe5\x88\206", "\347\255\211\347\xb4\232", "\xe5\x8f\xb7\xe4\xbf\xb8"]; } public function map($hpPBn) : array { return [$hpPBn->employee ? $hpPBn->employee->employee_code : "\116\57\101", $this->dateFormat($hpPBn->from_date, "\131\57\155\x2f\x64"), $this->dateFormat($hpPBn->to_date, "\x59\57\x6d\x2f\144"), $hpPBn->level && $hpPBn->level->parent ? $hpPBn->level->parent->name : '', $hpPBn->level ? $hpPBn->level->name : '', $hpPBn->salary_grade]; } public function styles(Worksheet $bkneP) { return [1 => ["\141\154\151\x67\156\x6d\145\x6e\164" => ["\x68\157\x72\x69\172\x6f\156\x74\x61\x6c" => Alignment::HORIZONTAL_CENTER, "\x76\x65\162\x74\151\143\141\x6c" => Alignment::VERTICAL_CENTER]], "\101\x31\72\106" . $bkneP->getHighestRow() => ["\x62\x6f\x72\x64\x65\x72\x73" => ["\x61\x6c\154\x42\157\x72\144\x65\162\x73" => ["\142\x6f\162\144\145\x72\x53\164\x79\154\145" => Border::BORDER_THIN]]], "\x41\x32\72\x41" . $bkneP->getHighestRow() => ["\141\x6c\x69\x67\x6e\155\x65\x6e\164" => ["\150\x6f\x72\151\x7a\x6f\156\x74\141\x6c" => Alignment::HORIZONTAL_LEFT, "\x76\x65\x72\x74\151\x63\x61\154" => Alignment::VERTICAL_CENTER]], "\x42\x31\72\x42" . $bkneP->getHighestRow() => ["\141\154\151\147\x6e\x6d\145\156\164" => ["\x68\157\162\151\172\157\156\164\x61\x6c" => Alignment::HORIZONTAL_CENTER, "\166\145\x72\x74\151\x63\141\x6c" => Alignment::VERTICAL_CENTER]], "\x43\x31\72\103" . $bkneP->getHighestRow() => ["\141\x6c\x69\x67\156\x6d\x65\156\x74" => ["\150\157\x72\151\172\x6f\156\164\x61\154" => Alignment::HORIZONTAL_CENTER, "\x76\145\x72\164\x69\x63\141\154" => Alignment::VERTICAL_CENTER]]]; } public function registerEvents() : array { return [AfterSheet::class => function (AfterSheet $y4dpz) { $y4dpz->sheet->freezePane("\101\62"); }]; } private function dateFormat($a9YRm, $V8geM = "\156\x2f\152\x2f\131") { if (!empty($a9YRm)) { goto ZETo_; } return ''; ZETo_: $bpVJR = is_string($a9YRm) ? $a9YRm : $a9YRm->format("\131\55\x6d\x2d\144"); return date($V8geM, strtotime($bpVJR)); } }