//go:build wireinject
// +build wireinject

// The build tag makes sure the stub is not built in the final build.

package main

import (
	"github.com/go-kratos/kratos/v2"
	"github.com/go-kratos/kratos/v2/log"
	"github.com/google/wire"
	"github.com/robfig/cron"
	"voucher/internal/biz"
	"voucher/internal/biz/cmb"
	"voucher/internal/biz/timeslicequery"
	"voucher/internal/conf"
	"voucher/internal/data"
	"voucher/internal/data/mixrepoimpl"
	"voucher/internal/data/repoimpl"
	"voucher/internal/data/wechatrepoimpl"
	log2 "voucher/internal/pkg/log"
	"voucher/internal/server"
	"voucher/internal/service"
)

// wireApp init kratos application.
func wireApp(*conf.Bootstrap, log.Logger, *log2.AccessLogger) (*kratos.App, func(), error) {
	panic(wire.Build(
		server.ProviderSetServer,
		service.ProviderSetService,
		cmb.ProviderSetCmb,
		biz.ProviderSetBiz,
		data.ProviderDataSet,
		repoimpl.ProviderRepoImplSet,
		wechatrepoimpl.ProviderWechatReposImplSet,
		mixrepoimpl.ProviderMixRepoImplSet,
		timeslicequery.ProviderSetTimeSliceQuery,
		log2.NewLogHelper,
		cron.New,
		newApp,
	))
}
