package bcbsi

import (
	"sync"

	"bitbucket.org/nemt/nemt-portal-api/infra/config"
)

var (
	instance *Service
	once     sync.Once
)

// Service holds the domain service repositories
type Service struct {
	BXE *bxeService
}

// New returns a new domain Service instance
func New(cfg *config.Config) *Service {
	once.Do(func() {
		instance = &Service{
			BXE: newBXEService(cfg),
		}
	})

	return instance
}
