$ErrorActionPreference = 'Stop'
. (Join-Path $PSScriptRoot 'Common.ps1')
. (Join-Path $PSScriptRoot 'UIHelpers.ps1')
Initialize-RBWindowsUI
try {
    $state = Get-RBConfiguration
    [void](Show-RBRecoveryKeyWindow -RecoveryKey $state.Secrets.repository_password -Email $state.Config.email -Language (Get-RBLanguage $state))
} catch {
    [Windows.Forms.MessageBox]::Show($_.Exception.Message, 'RansomBackup FREE', 'OK', 'Error') | Out-Null
    exit 1
}
