package dashboard

type DashboardService interface {
	GetDashboardStats(branchID uint, role string) (map[string]interface{}, error)
	GetAlerts(branchID uint, role string) ([]map[string]interface{}, error)
}

type serviceImpl struct {
	repo DashboardRepository
}

func NewService(repo DashboardRepository) DashboardService {
	return &serviceImpl{repo: repo}
}

func (s *serviceImpl) GetDashboardStats(branchID uint, role string) (map[string]interface{}, error) {
	return s.repo.GetStats(branchID, role)
}

func (s *serviceImpl) GetAlerts(branchID uint, role string) ([]map[string]interface{}, error) {
	return s.repo.GetAlerts(branchID, role)
}
