<?php

declare(strict_types=1);

namespace App\Services\Provisioning;

use InvalidArgumentException;

class ProvisioningFactory
{
    /**
     * Create a provisioning service instance based on service type.
     */
    public function make(string $serviceType): ProvisioningServiceInterface
    {
        return match ($serviceType) {
            'vps' => app(VirtFusionService::class),
            'dedicated' => app(SynergyCPService::class),
            'hosting' => app(EnhanceService::class),
            'game' => app(PterodactylService::class),
            default => throw new InvalidArgumentException("Unsupported service type: {$serviceType}"),
        };
    }
}
