ConsoleMonster.psm1

# Get library name, from the PSM1 file name
$LibraryName = 'ConsoleMonster'
$Library = "$LibraryName.dll"
$Class = "$LibraryName.Initialize"

$AssemblyFolders = Get-ChildItem -Path $PSScriptRoot\Lib -Directory -ErrorAction SilentlyContinue

# Lets find which libraries we need to load
$Default = $false
$Core = $false
$Standard = $false
foreach ($A in $AssemblyFolders.Name) {
    if ($A -eq 'Default') {
        $Default = $true
    }
    elseif ($A -eq 'Core') {
        $Core = $true
    }
    elseif ($A -eq 'Standard') {
        $Standard = $true
    }
}
if ($Standard -and $Core -and $Default) {
    $FrameworkNet = 'Default'
    $Framework = 'Standard'
}
elseif ($Standard -and $Core) {
    $Framework = 'Standard'
    $FrameworkNet = 'Standard'
}
elseif ($Core -and $Default) {
    $Framework = 'Core'
    $FrameworkNet = 'Default'
}
elseif ($Standard -and $Default) {
    $Framework = 'Standard'
    $FrameworkNet = 'Default'
}
elseif ($Standard) {
    $Framework = 'Standard'
    $FrameworkNet = 'Standard'
}
elseif ($Core) {
    $Framework = 'Core'
    $FrameworkNet = ''
}
elseif ($Default) {
    $Framework = ''
    $FrameworkNet = 'Default'
}
else {
    Write-Error -Message 'No assemblies found'
}
if ($PSEdition -eq 'Core') {
    $LibFolder = $Framework
}
else {
    $LibFolder = $FrameworkNet
}

try {
    $ImportModule = Get-Command -Name Import-Module -Module Microsoft.PowerShell.Core

    if (-not ($Class -as [type])) {
        & $ImportModule ([IO.Path]::Combine($PSScriptRoot, 'Lib', $LibFolder, $Library)) -ErrorAction Stop
    }
    else {
        $Type = "$Class" -as [Type]
        & $importModule -Force -Assembly ($Type.Assembly)
    }
}
catch {
    if ($ErrorActionPreference -eq 'Stop') {
        throw
    }
    else {
        Write-Warning -Message "Importing module $Library failed. Fix errors before continuing. Error: $($_.Exception.Message)"
        # we will continue, but it's not a good idea to do so
        # return
    }
}
# Dot source all libraries by loading external file
. $PSScriptRoot\ConsoleMonster.Libraries.ps1

function New-SpectreImage {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory, ParameterSetName = 'File')][string] $FilePath,
        [Parameter(Mandatory, ParameterSetName = 'Url')][alias()][Uri] $Uri,
        [int] $MaxWidth
    )
    if ($Uri) {
        $Extension = [IO.Path]::GetExtension($Uri.AbsolutePath)
        $FilePath = [System.IO.Path]::Combine([System.IO.Path]::GetTempPath(), "$($([System.IO.Path]::GetRandomFileName()).Split('.')[0]).$Extension")
        $ProgressPreference = 'SilentlyContinue'
        Try {
            Invoke-WebRequest -Uri $Uri -OutFile $FilePath -ErrorAction Stop
        }
        Catch {
            Write-Warning -Message "Failed to download image from $($Uri.AbsoluteUri)"
            Return
        }
    }
    if ($FilePath -and (Test-Path -Path $FilePath)) {
        $Image = [Spectre.Console.CanvasImage]::new($FilePath)
    }
    if ($MaxWidth) {
        $Image.MaxWidth = $MaxWidth
    }
    # $Image = [Spectre.Console.CanvasImageExtensions]::BicubicResampler($Image)
    # $Image

    [Spectre.Console.AnsiConsole]::Write($Image)
}
function New-SpectreRule {
    [cmdletBinding()]
    param(
        [Array] $Text,
        [Array] $Color,
        [Alias('Justification')][Spectre.Console.Justify] $Align,
        [validateSet('bold', 'dim', 'italic', 'underline', 'invert', 'conceal', 'slowblink', 'rapidblink', 'strikethrough')][string] $RuleStyle,
        [string] $RuleColor
    )
    $DefaultColor = $Color[0]
    $PreparedText = if ($Text.Count -ne 0) {
        for ($i = 0; $i -lt $Text.Length; $i++ ) {
            if ($Color[$i]) {
                "[$($Color[$i])]$($Text[$i])[/]"
            }
            elseif ($DefaultColor) {
                "[$($DefaultColor)]$($Text[$i])[/]"
            }
            else {
                "$($Text[$i])"
            }
        }
    }
    $rule = [Spectre.Console.Rule]::new($PreparedText)
    $rule.Justification = $Align
    if ($RuleColor -and $Style) {
        $rule.Style = "$RuleColor $style"
    }
    elseif ($RuleColor) {
        $Rule.Style = $RuleColor
    }
    elseif ($Style) {
        $Rule.Style = $Style
    }
    [Spectre.Console.AnsiConsole]::Render($rule)
}
function New-Terminal {
    [cmdletBinding()]
    param(
        [ScriptBlock] $Application
    )

    [Terminal.Gui.Application]::Init()

    if ($Application) {
        $OutputApp = & $Application
        foreach ($O in $OutputApp) {
            [Terminal.Gui.Application]::Top.Add($O)
        }
    }

    # Show the window (takes over the whole screen).
    # Note: This is a blocking call.
    [Terminal.Gui.Application]::Run()

    [Terminal.Gui.Application]::Shutdown() # Clears the screen too; required for being able to rerun the application in the same session.
}
function New-TerminalButton {
    [cmdletBinding()]
    param(
        [scriptblock] $Command,
        [string] $Text,
        [int] $X,
        [int] $Y,
        [switch] $DisableAutosize
    )

    $Button = [Terminal.Gui.Button]::new()
    $Button.X = $X
    $Button.Y = $Y
    $Button.Text = $Text
    $Button.AutoSize = -not $DisableAutosize.IsPresent
    $Button
}
function New-TerminalCheckBox {
    [CmdletBinding()]
    param(
        [string[]] $Text,
        [int] $X,
        [int] $Y
    )
    [Terminal.Gui.CheckBox]::new($X, $Y, $Text)
}
function New-TerminalRadioGroup {
    [cmdletBinding()]
    param(
        [string[]] $Text,
        [int] $X,
        [int] $Y,
        [int] $Selected
    )
    <#
    Terminal.Gui.RadioGroup new()
    Terminal.Gui.RadioGroup new(NStack.ustring[] radioLabels, int selected = 0)
    Terminal.Gui.RadioGroup new(Terminal.Gui.Rect rect, NStack.ustring[] radioLabels, int selected = 0)
    Terminal.Gui.RadioGroup new(int x, int y, NStack.ustring[] radioLabels, int selected = 0)
    #>

    [Terminal.Gui.RadioGroup]::new($X, $Y, $Text, $Selected)
}
function New-TerminalText {
    [cmdletBinding()]
    param(
        [int] $X,
        [int] $Y,
        [int] $Width,
        [Parameter(Mandatory)][string] $Text
    )

    $TextField = [Terminal.Gui.TextField]::new()
    $TextField.X = $X
    $TextField.Y = $Y
    if ($Width) {
        $TextField.Width = $Width
    }
    if ($Text) {
        $TextField.Text = $Text
    }
    $TextField
}
function New-TerminalWindow {
    [cmdletBinding()]
    param(
        [scriptblock] $WindowContent,
        [string] $Title
    )

    $Window = [Terminal.Gui.Window]::new()
    if ($Title) {
        $Window.Title = $Title
    }

    if ($WindowContent) {
        $Output = & $WindowContent

        foreach ($O in $Output) {
            $Window.Add($O)
        }
    }

    $Window.Add($btn)
    $Window
}


if ($PSVersionTable.PSEdition -eq 'Desktop' -and (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full").Release -lt 461808) {
    Write-Warning "This module requires .NET Framework 4.7.2 or later."; return 
} 

# Export functions and aliases as required
Export-ModuleMember -Function @('New-SpectreImage', 'New-SpectreRule', 'New-Terminal', 'New-TerminalButton', 'New-TerminalCheckBox', 'New-TerminalRadioGroup', 'New-TerminalText', 'New-TerminalWindow') -Alias @()
# SIG # Begin signature block
# MIItqwYJKoZIhvcNAQcCoIItnDCCLZgCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAgGt4qQyv5P94U
# aGRb/OVL/+U67MwVrIGVKSAHbVOJ+KCCJq4wggWNMIIEdaADAgECAhAOmxiO+dAt
# 5+/bUOIIQBhaMA0GCSqGSIb3DQEBDAUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0yMjA4MDEwMDAwMDBa
# Fw0zMTExMDkyMzU5NTlaMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNVBAMTGERpZ2lD
# ZXJ0IFRydXN0ZWQgUm9vdCBHNDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC
# ggIBAL/mkHNo3rvkXUo8MCIwaTPsw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