<?php

declare(strict_types=1);

namespace WorkforceOS\Services;

final class RuleService
{
    public function list(array $tenant): array
    {
        return [
            'tenant_id' => $tenant['id'],
            'rules' => [
                [
                    'id' => 1,
                    'name' => 'Late after 10 minutes',
                    'module' => 'attendance',
                    'priority' => 10,
                    'condition' => 'late_minutes > 10',
                    'action' => 'warning',
                    'status' => 'active',
                ],
                [
                    'id' => 2,
                    'name' => 'Late after 30 minutes',
                    'module' => 'attendance',
                    'priority' => 20,
                    'condition' => 'late_minutes > 30',
                    'action' => 'half_day_deduction',
                    'status' => 'active',
                ],
                [
                    'id' => 3,
                    'name' => 'Holiday overtime multiplier',
                    'module' => 'payroll',
                    'priority' => 30,
                    'condition' => 'is_holiday = true',
                    'action' => 'ot_multiplier:2.0',
                    'status' => 'active',
                ],
            ],
            'supported_operators' => ['=', '!=', '>', '>=', '<', '<=', 'in'],
            'actions' => ['warning', 'half_day_deduction', 'absent_deduction', 'fixed_penalty', 'ot_multiplier'],
        ];
    }
}
