Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'

# Load shared utilities
$utilsPath = Join-Path (Split-Path -Parent $MyInvocation.MyCommand.Definition) '..\lib\utils.ps1'
. $utilsPath

if (-not (Test-Path -Path ".\evibes" -PathType Container))
{
    Write-Error-Custom "❌  Please run this script from the project's root (where the 'evibes' directory lives)."
    exit 1
}

$artPath = Join-Path (Split-Path -Parent $MyInvocation.MyCommand.Definition) '..\ASCII_ART_EVIBES'

if (-not (Test-Path $artPath))
{
    Write-Error-Custom "❌  Could not find ASCII art at $artPath"
    exit 1
}

if (Test-Interactive)
{
    $purple = "`e[38;2;121;101;209m"
    $reset = "`e[0m"
    Get-Content -Raw -Path $artPath | ForEach-Object { Write-Host "$purple$_$reset" }
    Write-Host "`n                                                                       by WISELESS TEAM`n" -ForegroundColor Gray
}
else
{
    # In non-interactive mode, just show simple banner
    Write-Output "eVibes by WISELESS TEAM"
}

exit 0