namespace DramaLing.Api.Services.Storage; public static class ImageStorageFactory { public static IImageStorageService Create( IConfiguration configuration, ILogger logger) { var provider = configuration["ImageStorage:Provider"]?.ToLower() ?? "local"; return provider switch { "local" => new LocalImageStorageService(configuration, logger as ILogger ?? throw new ArgumentException("Invalid logger type")), "aws" => throw new NotImplementedException("AWS storage not yet implemented"), "azure" => throw new NotImplementedException("Azure storage not yet implemented"), _ => throw new NotSupportedException($"Storage provider '{provider}' not supported") }; } }