namespace Watcher.Services;

public class VersionService : IVersionService
{
    private readonly string _version;

    public VersionService(IConfiguration configuration)
    {
        // Priorität: Environment Variable > Configuration > Default
        _version = Environment.GetEnvironmentVariable("WATCHER_VERSION")
                   ?? configuration["Application:Version"]
                   ?? "development";
    }

    public string GetVersion()
    {
        return _version;
    }
}
