#!/bin/pwsh
. "$PSScriptRoot/../../Scripts/AppAssociations.ps1";

Write-Host "Configuring Firefox";
$progIdSuffix = "-308046B0AF4A39CB";
$appName = "Firefox";

$extensions = @(
    ".htm",
    ".html",
    ".svg",
    ".xht",
    ".xhtml"
);

$schemes = @(
    "http",
    "https"
);

Write-Information "Making Firefox the default browser";

foreach ($extension in $extensions) {
    Set-DefaultAppAssociation $extension "FirefoxHTML$progIdSuffix" $appName;
}

foreach ($scheme in $schemes) {
    Set-DefaultAppAssociation $scheme "FirefoxURL$progIdSuffix" $appName;
}