package mongodb

import (
	"context"

	"go.mongodb.org/mongo-driver/mongo"
)

// Interface defines MongoDB operations needed by the operator
type Interface interface {
	GetDeployment(ctx context.Context, id string) (*MongoDeployment, error)
	ListDeployments(ctx context.Context) ([]MongoDeployment, error)
	CreateDeployment(ctx context.Context, deployment *MongoDeployment) error
	UpdateDeployment(ctx context.Context, deployment *MongoDeployment) error
	DeleteDeployment(ctx context.Context, id string) error
}

// Client implements the MongoDB interface using a real MongoDB client
type Client struct {
	client *mongo.Client
}

// NewClient creates a new MongoDB client
func NewClient(client *mongo.Client) Interface {
	return &Client{client: client}
}
