// Code generated by Wire. DO NOT EDIT.

//go:generate go run github.com/google/wire/cmd/wire
//go:build !wireinject
// +build !wireinject

package adminapi

import (
	"github.com/authgear/authgear-server/pkg/lib/admin/authz"
	"github.com/authgear/authgear-server/pkg/lib/config"
	"github.com/authgear/authgear-server/pkg/lib/config/configsource"
	"github.com/authgear/authgear-server/pkg/lib/infra/db"
	"github.com/authgear/authgear-server/pkg/lib/infra/db/globaldb"
	"github.com/authgear/authgear-server/pkg/util/clock"
)

// Injectors from wire.go:

func NewInvoker(pool *db.Pool, credentials *config.GlobalDatabaseCredentialsEnvironmentConfig) *Invoker {
	databaseEnvironmentConfig := config.NewDefaultDatabaseEnvironmentConfig()
	handle := globaldb.NewHandle(pool, credentials, databaseEnvironmentConfig)
	sqlBuilder := globaldb.NewSQLBuilder(credentials)
	sqlExecutor := globaldb.NewSQLExecutor(handle)
	store := &configsource.Store{
		SQLBuilder:  sqlBuilder,
		SQLExecutor: sqlExecutor,
	}
	clock := _wireSystemClockValue
	adder := &authz.Adder{
		Clock: clock,
	}
	invoker := &Invoker{
		DatabaseHandle: handle,
		Store:          store,
		Adder:          adder,
	}
	return invoker
}

var (
	_wireSystemClockValue = clock.NewSystemClock()
)
