package s3

import (
	"go.uber.org/zap"

	"codeberg.org/mapleopentech/monorepo/cloud/maplepress-backend/config"
)

// ProvideS3ObjectStorage provides an S3 object storage instance
func ProvideS3ObjectStorage(cfg *config.Config, logger *zap.Logger) S3ObjectStorage {
	// Create configuration provider
	configProvider := NewS3ObjectStorageConfigurationProvider(
		cfg.AWS.AccessKey,
		cfg.AWS.SecretKey,
		cfg.AWS.Endpoint,
		cfg.AWS.Region,
		cfg.AWS.BucketName,
		false, // Default to private bucket
	)

	// Return new S3 storage instance
	return NewObjectStorage(configProvider, logger)
}
