// Code generated by Wire. DO NOT EDIT.

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

package main

import (
	"github.com/adshao/ordinals-indexer/internal/biz"
	"github.com/adshao/ordinals-indexer/internal/conf"
	"github.com/adshao/ordinals-indexer/internal/data"
	"github.com/adshao/ordinals-indexer/internal/ord"
	"github.com/go-kratos/kratos/v2/log"
)

import (
	_ "go.uber.org/automaxprocs"
)

// Injectors from wire.go:

// wireApp init kratos application.
func wireApp(confOrd *conf.Ord, confData *conf.Data, logger log.Logger) (*ord.Syncer, func(), error) {
	dataData, cleanup, err := data.NewData(confData, logger)
	if err != nil {
		return nil, nil, err
	}
	collectionRepo := data.NewCollectionRepo(dataData, logger)
	collectionUsecase := biz.NewCollectionUsecase(collectionRepo, logger)
	tokenRepo := data.NewTokenRepo(dataData, logger)
	tokenUsecase := biz.NewTokenUsecase(tokenRepo, logger)
	syncer, cleanup2, err := newApp(confOrd, dataData, collectionUsecase, tokenUsecase, logger)
	if err != nil {
		cleanup()
		return nil, nil, err
	}
	return syncer, func() {
		cleanup2()
		cleanup()
	}, nil
}
