// 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 (
	"github.com/ch3nnn/webstack-go/internal/dal/repository"
	"github.com/ch3nnn/webstack-go/internal/handler"
	category2 "github.com/ch3nnn/webstack-go/internal/handler/category"
	config2 "github.com/ch3nnn/webstack-go/internal/handler/config"
	dashboard2 "github.com/ch3nnn/webstack-go/internal/handler/dashboard"
	index2 "github.com/ch3nnn/webstack-go/internal/handler/index"
	site2 "github.com/ch3nnn/webstack-go/internal/handler/site"
	user2 "github.com/ch3nnn/webstack-go/internal/handler/user"
	"github.com/ch3nnn/webstack-go/internal/server"
	"github.com/ch3nnn/webstack-go/internal/service"
	"github.com/ch3nnn/webstack-go/internal/service/category"
	"github.com/ch3nnn/webstack-go/internal/service/config"
	"github.com/ch3nnn/webstack-go/internal/service/dashboard"
	"github.com/ch3nnn/webstack-go/internal/service/index"
	"github.com/ch3nnn/webstack-go/internal/service/site"
	"github.com/ch3nnn/webstack-go/internal/service/user"
	"github.com/ch3nnn/webstack-go/pkg/app"
	"github.com/ch3nnn/webstack-go/pkg/jwt"
	"github.com/ch3nnn/webstack-go/pkg/log"
	"github.com/ch3nnn/webstack-go/pkg/server/http"
	"github.com/google/wire"
	"github.com/spf13/viper"
)

// Injectors from wire.go:

func NewWire(viperViper *viper.Viper, logger *log.Logger) (*app.App, func(), error) {
	engine := http.NewGinDefaultServer()
	jwtJWT := jwt.NewJwt(viperViper)
	handlerHandler := handler.NewHandler(logger)
	db := repository.NewDB(viperViper, logger)
	repositoryRepository := repository.NewRepository(logger, db)
	serviceService := service.NewService(logger, jwtJWT, repositoryRepository)
	dashboardService := dashboard.NewService(serviceService)
	dashboardHandler := dashboard2.NewHandler(handlerHandler, dashboardService)
	iStSiteDao := repository.NewStSiteDao()
	iStCategoryDao := repository.NewStCategoryDao()
	iSysConfigDao := repository.NewSysConfigDao()
	indexService := index.NewService(serviceService, iStSiteDao, iStCategoryDao, iSysConfigDao)
	indexHandler := index2.NewHandler(handlerHandler, indexService)
	iSysUserDao := repository.NewSysUserDao()
	iSysMenuDao := repository.NewSysMenuDao()
	iSysUserMenuDao := repository.NewSysUserMenuDao()
	userService := user.NewService(serviceService, iSysUserDao, iStSiteDao, iStCategoryDao, iSysMenuDao, iSysUserMenuDao)
	userHandler := user2.NewHandler(handlerHandler, userService)
	siteService := site.NewService(serviceService, iStSiteDao, iStCategoryDao)
	siteHandler := site2.NewHandler(handlerHandler, siteService)
	categoryService := category.NewService(serviceService, iStCategoryDao)
	categoryHandler := category2.NewHandler(handlerHandler, categoryService)
	configService := config.NewService(serviceService, iSysConfigDao)
	configHandler := config2.NewHandler(handlerHandler, configService)
	httpServer := server.NewHTTPServer(engine, logger, viperViper, jwtJWT, dashboardHandler, indexHandler, userHandler, siteHandler, categoryHandler, configHandler)
	appApp := newApp(httpServer)
	return appApp, func() {
	}, nil
}

// wire.go:

var repositorySet = wire.NewSet(repository.NewDB, repository.NewRepository, repository.NewSysUserDao, repository.NewStCategoryDao, repository.NewStSiteDao, repository.NewSysUserMenuDao, repository.NewSysConfigDao, repository.NewSysMenuDao)

var handlerSet = wire.NewSet(handler.NewHandler, user2.NewHandler, index2.NewHandler, site2.NewHandler, category2.NewHandler, dashboard2.NewHandler, config2.NewHandler)

var serviceSet = wire.NewSet(service.NewService, user.NewService, index.NewService, site.NewService, category.NewService, config.NewService, dashboard.NewService)

var serverSet = wire.NewSet(server.NewHTTPServer)

// build App
func newApp(httpServer *http.Server) *app.App {
	return app.NewApp(app.WithServer(httpServer), app.WithName("webstack-go"))
}
