// Code generated by Wire. DO NOT EDIT.

//go:generate go run ./pkg/build/wire/cmd/wire/main.go
//go:build !wireinject

package main

import (
	"example.com/bar"
	"example.com/baz"
	"example.com/foo"
	"fmt"
)

// Injectors from wire.go:

func newMainService(mainConfig MainConfig) *MainService {
	config := mainConfig.Foo
	service := foo.New(config)
	barConfig := mainConfig.Bar
	barService := bar.New(barConfig, service)
	bazConfig := mainConfig.baz
	bazService := baz.New(bazConfig, barService)
	mainService := &MainService{
		Foo: service,
		Bar: barService,
		baz: bazService,
	}
	return mainService
}

// wire.go:

type MainConfig struct {
	Foo *foo.Config
	Bar *bar.Config
	baz *baz.Config
}

type MainService struct {
	Foo *foo.Service
	Bar *bar.Service
	baz *baz.Service
}

func (m *MainService) String() string {
	return fmt.Sprintf("%d %d %d", m.Foo.Cfg.V, m.Bar.Cfg.V, m.baz.Cfg.V)
}

func main() {
	cfg := MainConfig{
		Foo: &foo.Config{1},
		Bar: &bar.Config{2},
		baz: &baz.Config{3},
	}
	svc := newMainService(cfg)
	fmt.Println(svc.String())
}
