param(
    $Action,
    [hashtable] $Arguments
)

. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";

Start-SoftwareInstaller @PSBoundParameters `
    -Installer {
        foreach ($feature in @("DirectPlay", "NetFx3")) {
            if ((Get-WindowsOptionalFeature -Online -FeatureName $feature).State -ne "Enabled") {
                Write-Information "Enabling the ``$feature`` featureā€¦";
                choco install --source windowsFeatures  -y $feature;
            }

            Install-WingetPackage Nadeo.TrackManiaNationsForever;
            Remove-DesktopIcon "*TmNationsForever*";
        }
    };

# ToDo: Add restoration