package generator

// GENERATED BY BUD. DO NOT EDIT.

{{- if $.Imports }}

import (
	{{- range $import := $.Imports }}
	{{$import.Name}} "{{$import.Path}}"
	{{- end }}
)
{{- end }}

func New(
	fsys *genfs.FileSystem,
	module *gomod.Module,
	log log.Log,
	{{- range $generator := $.FileGenerators }}
	{{ $generator.Camel }} *{{ $generator.Import.Name }}.Generator,
	{{- end }}
	{{- range $generator := $.FileServers }}
	{{ $generator.Camel }} *{{ $generator.Import.Name }}.Generator,
	{{- end }}
	{{- range $generator := $.GenerateDirs }}
	{{ $generator.Camel }} *{{ $generator.Import.Name }}.Generator,
	{{- end }}
	{{- range $generator := $.ServeFiles }}
	{{ $generator.Camel }} *{{ $generator.Import.Name }}.Generator,
	{{- end }}
) FS {
	{{- range $generator := $.FileGenerators }}
	fsys.FileGenerator(`{{ $generator.Path }}`, {{ $generator.Camel }})
	{{- end }}
	{{- range $generator := $.FileServers }}
	fsys.FileServer(`{{ $generator.Path }}`, {{ $generator.Camel }})
	{{- end }}
	{{- range $generator := $.GenerateDirs }}
	fsys.GenerateDir(`{{ $generator.Path }}`, {{ $generator.Camel }}.{{ $generator.Method }})
	{{- end }}
	{{- range $generator := $.ServeFiles }}
	fsys.ServeFile(`{{ $generator.Path }}`, {{ $generator.Camel }}.Serve)
	{{- end }}
	return fsys
}

type FS = fs.FS
