// 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 cmd

import (
	"github.com/google/wire"
	"github.com/navidrome/navidrome/core"
	"github.com/navidrome/navidrome/core/agents"
	"github.com/navidrome/navidrome/core/agents/lastfm"
	"github.com/navidrome/navidrome/core/agents/listenbrainz"
	"github.com/navidrome/navidrome/core/artwork"
	"github.com/navidrome/navidrome/core/ffmpeg"
	"github.com/navidrome/navidrome/core/playback"
	"github.com/navidrome/navidrome/core/scrobbler"
	"github.com/navidrome/navidrome/db"
	"github.com/navidrome/navidrome/persistence"
	"github.com/navidrome/navidrome/scanner"
	"github.com/navidrome/navidrome/server"
	"github.com/navidrome/navidrome/server/events"
	"github.com/navidrome/navidrome/server/nativeapi"
	"github.com/navidrome/navidrome/server/public"
	"github.com/navidrome/navidrome/server/subsonic"
)

// Injectors from wire_injectors.go:

func CreateServer(musicFolder string) *server.Server {
	dbDB := db.Db()
	dataStore := persistence.New(dbDB)
	broker := events.GetBroker()
	serverServer := server.New(dataStore, broker)
	return serverServer
}

func CreateNativeAPIRouter() *nativeapi.Router {
	dbDB := db.Db()
	dataStore := persistence.New(dbDB)
	share := core.NewShare(dataStore)
	playlists := core.NewPlaylists(dataStore)
	router := nativeapi.New(dataStore, share, playlists)
	return router
}

func CreateSubsonicAPIRouter() *subsonic.Router {
	dbDB := db.Db()
	dataStore := persistence.New(dbDB)
	fileCache := artwork.GetImageCache()
	fFmpeg := ffmpeg.New()
	agentsAgents := agents.New(dataStore)
	externalMetadata := core.NewExternalMetadata(dataStore, agentsAgents)
	artworkArtwork := artwork.NewArtwork(dataStore, fileCache, fFmpeg, externalMetadata)
	transcodingCache := core.GetTranscodingCache()
	mediaStreamer := core.NewMediaStreamer(dataStore, fFmpeg, transcodingCache)
	share := core.NewShare(dataStore)
	archiver := core.NewArchiver(mediaStreamer, dataStore, share)
	players := core.NewPlayers(dataStore)
	playlists := core.NewPlaylists(dataStore)
	cacheWarmer := artwork.NewCacheWarmer(artworkArtwork, fileCache)
	broker := events.GetBroker()
	scannerScanner := scanner.GetInstance(dataStore, playlists, cacheWarmer, broker)
	playTracker := scrobbler.GetPlayTracker(dataStore, broker)
	playbackServer := playback.GetInstance(dataStore)
	router := subsonic.New(dataStore, artworkArtwork, mediaStreamer, archiver, players, externalMetadata, scannerScanner, broker, playlists, playTracker, share, playbackServer)
	return router
}

func CreatePublicRouter() *public.Router {
	dbDB := db.Db()
	dataStore := persistence.New(dbDB)
	fileCache := artwork.GetImageCache()
	fFmpeg := ffmpeg.New()
	agentsAgents := agents.New(dataStore)
	externalMetadata := core.NewExternalMetadata(dataStore, agentsAgents)
	artworkArtwork := artwork.NewArtwork(dataStore, fileCache, fFmpeg, externalMetadata)
	transcodingCache := core.GetTranscodingCache()
	mediaStreamer := core.NewMediaStreamer(dataStore, fFmpeg, transcodingCache)
	share := core.NewShare(dataStore)
	archiver := core.NewArchiver(mediaStreamer, dataStore, share)
	router := public.New(dataStore, artworkArtwork, mediaStreamer, share, archiver)
	return router
}

func CreateLastFMRouter() *lastfm.Router {
	dbDB := db.Db()
	dataStore := persistence.New(dbDB)
	router := lastfm.NewRouter(dataStore)
	return router
}

func CreateListenBrainzRouter() *listenbrainz.Router {
	dbDB := db.Db()
	dataStore := persistence.New(dbDB)
	router := listenbrainz.NewRouter(dataStore)
	return router
}

func GetScanner() scanner.Scanner {
	dbDB := db.Db()
	dataStore := persistence.New(dbDB)
	playlists := core.NewPlaylists(dataStore)
	fileCache := artwork.GetImageCache()
	fFmpeg := ffmpeg.New()
	agentsAgents := agents.New(dataStore)
	externalMetadata := core.NewExternalMetadata(dataStore, agentsAgents)
	artworkArtwork := artwork.NewArtwork(dataStore, fileCache, fFmpeg, externalMetadata)
	cacheWarmer := artwork.NewCacheWarmer(artworkArtwork, fileCache)
	broker := events.GetBroker()
	scannerScanner := scanner.GetInstance(dataStore, playlists, cacheWarmer, broker)
	return scannerScanner
}

func GetPlaybackServer() playback.PlaybackServer {
	dbDB := db.Db()
	dataStore := persistence.New(dbDB)
	playbackServer := playback.GetInstance(dataStore)
	return playbackServer
}

// wire_injectors.go:

var allProviders = wire.NewSet(core.Set, artwork.Set, server.New, subsonic.New, nativeapi.New, public.New, persistence.New, lastfm.NewRouter, listenbrainz.NewRouter, events.GetBroker, scanner.GetInstance, db.Db)
