<?php

namespace App\Support;

final class AgentSettlementCycle
{
    /** @var list<string> */
    public const VALUES = ['daily', 'weekly', 'monthly'];

    public static function normalize(mixed $value, string $default = 'weekly'): string
    {
        $normalized = is_string($value) ? strtolower(trim($value)) : '';

        return in_array($normalized, self::VALUES, true) ? $normalized : $default;
    }
}
