using EpsonPrinter.Services;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;

var builder = WebApplication.CreateBuilder(args);

// Services
builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();

builder.Services.AddScoped<EpsonPrintService>();

var app = builder.Build();

// Swagger (altid aktiv – vi er på en Pi, ikke i produktion)
app.UseSwagger();
app.UseSwaggerUI();

// Routing
app.MapControllers();

app.Run();