<?php

namespace App\Support;

use Illuminate\Support\Str;

class LicenseKeyGenerator
{
    public static function generate(): string
    {
        $prefix = strtoupper(config('installer.free_license_prefix', 'FREE'));

        return sprintf(
            '%s-%s-%s-%s',
            $prefix,
            strtoupper(Str::random(4)),
            strtoupper(Str::random(4)),
            strtoupper(Str::random(4)),
        );
    }
}
