<?php

namespace App\Modules\Hr;

use App\Modules\Hr\Services\ExcelExporter as ExcelExporterService;

/**
 * Bridge class for ExcelExporter to maintain backward compatibility
 * Delegates to the actual implementation in Services namespace
 */
class ExcelExporter
{
    protected $service;

    public function __construct()
    {
        $this->service = new ExcelExporterService();
    }

    /**
     * Export user timesheet data to Excel
     *
     * @param int $user_id
     * @param string|null $start
     * @param string|null $end
     * @return \Maatwebsite\Excel\Writers\LaravelExcelWriter
     */
    public function export($user_id, $start = null, $end = null)
    {
        return $this->service->export($user_id, $start, $end);
    }

    /**
     * Export user timesheet data using EXACT Laravel5 logic
     *
     * @param int $user_id
     * @param string|null $start
     * @param string|null $end
     * @return \Maatwebsite\Excel\Writers\LaravelExcelWriter
     */
    public function exportLaravel5Style($user_id, $start = null, $end = null)
    {
        return $this->service->exportLaravel5Style($user_id, $start, $end);
    }
} 