package mocks

import (
	"context"

	"github.com/litmuschaos/litmus/chaoscenter/graphql/server/graph/model"
	"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/database/mongodb/chaos_infrastructure"
	"github.com/litmuschaos/litmus/chaoscenter/graphql/server/pkg/gitops"
	"github.com/stretchr/testify/mock"
)

// GitOpsService is an autogenerated mock type for the GitOpsService type
type GitOpsService struct {
	mock.Mock
}

// GitOpsNotificationHandler provides a mock function with given fields: ctx, cluster, experimentID
func (g *GitOpsService) GitOpsNotificationHandler(ctx context.Context, infra chaos_infrastructure.ChaosInfra, experimentID string) (string, error) {
	args := g.Called(ctx, infra, experimentID)
	return args.String(0), args.Error(1)
}

// EnableGitOpsHandler provides a mock function with given fields: ctx, config
func (g *GitOpsService) EnableGitOpsHandler(ctx context.Context, project_id string, config model.GitConfig) (bool, error) {
	args := g.Called(ctx, config)
	return args.Bool(0), args.Error(1)
}

// DisableGitOpsHandler provides a mock function with given fields: ctx, projectID
func (g *GitOpsService) DisableGitOpsHandler(ctx context.Context, projectID string) (bool, error) {
	args := g.Called(ctx, projectID)
	return args.Bool(0), args.Error(1)
}

// UpdateGitOpsDetailsHandler provides a mock function with given fields: ctx, config
func (g *GitOpsService) UpdateGitOpsDetailsHandler(ctx context.Context, projectId string, config model.GitConfig) (bool, error) {
	args := g.Called(ctx, config)
	return args.Bool(0), args.Error(1)
}

// GetGitOpsDetails provides a mock function with given fields: ctx, projectID
func (g *GitOpsService) GetGitOpsDetails(ctx context.Context, projectID string) (*model.GitConfigResponse, error) {
	args := g.Called(ctx, projectID)
	return args.Get(0).(*model.GitConfigResponse), args.Error(1)
}

// UpsertWorkflowToGit provides a mock function with given fields: ctx, experiment
func (g *GitOpsService) UpsertExperimentToGit(ctx context.Context, projectID string, experiment *model.ChaosExperimentRequest) error {
	args := g.Called(ctx, projectID, experiment)
	return args.Error(0)
}

// DeleteWorkflowFromGit provides a mock function with given fields: ctx, experiment
func (g *GitOpsService) DeleteExperimentFromGit(ctx context.Context, projectID string, experiment *model.ChaosExperimentRequest) error {
	args := g.Called(ctx, experiment)
	return args.Error(0)
}

// GitOpsSyncHandler provides a mock function with given fields: singleRun
func (g *GitOpsService) GitOpsSyncHandler(singleRun bool) {
	g.Called(singleRun)
}

func (g *GitOpsService) SyncDBToGit(ctx context.Context, config gitops.GitConfig) error {
	args := g.Called(ctx, config)
	return args.Error(0)
}
