// PRE-GENERATED (design session). Locates the Equalizer APO config dir via default paths.
// Dev session may add a registry lookup (HKLM\SOFTWARE\EqualizerAPO) for robustness.
using System;
using System.IO;

namespace DansoriEQ.App.Apo;

public static class ApoLocator
{
    public static string? FindConfigDir()
    {
        foreach (var pf in new[]
        {
            Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),
            Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86)
        })
        {
            if (string.IsNullOrEmpty(pf)) continue;
            var dir = Path.Combine(pf, "EqualizerAPO", "config");
            if (Directory.Exists(dir)) return dir;
        }
        return null;
    }

    public static bool IsInstalled => FindConfigDir() != null;
}
