// Code generated by Wire. DO NOT EDIT.

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

package wire

import (
	"myexampleapp/pkg"
	"myexampleapp/pkg/asynctask"
	"myexampleapp/pkg/config"
	"myexampleapp/pkg/handler"
	"myexampleapp/pkg/zcore/app"
	"myexampleapp/pkg/zcore/injection"
	"myexampleapp/pkg/zcore/model"
	"myexampleapp/pkg/zgen/taskgen"
)

// Injectors from wire.go:

func InitApp() (*app.App, error) {
	configConfig, err := config.NewConfig()
	if err != nil {
		return nil, err
	}
	application, err := pkg.InitAnclaxApplication(configConfig)
	if err != nil {
		return nil, err
	}
	taskStoreInterface := injection.InjectTaskStore(application)
	taskRunner := taskgen.NewTaskRunner(taskStoreInterface)
	pluginMeta := pkg.ProvidePluginMeta()
	modelInterface, err := model.NewModel(configConfig, pluginMeta)
	if err != nil {
		return nil, err
	}
	serverInterface, err := handler.NewHandler(modelInterface, taskRunner)
	if err != nil {
		return nil, err
	}
	authInterface := injection.InjectAuth(application)
	validator := handler.NewValidator(authInterface)
	executorInterface := asynctask.NewExecutor(modelInterface)
	taskHandler := taskgen.NewTaskHandler(executorInterface)
	plugin := app.NewPlugin(serverInterface, validator, taskHandler)
	appApp, err := pkg.Init(application, taskRunner, plugin, modelInterface)
	if err != nil {
		return nil, err
	}
	return appApp, nil
}
