package collection

import (
	"codeberg.org/mapleopentech/monorepo/native/desktop/maplefile/internal/domain/collection"
)

type ListUseCase struct {
	collectionRepo collection.Repository
}

// ProvideListUseCase creates the use case for Wire
func ProvideListUseCase(collectionRepo collection.Repository) *ListUseCase {
	return &ListUseCase{collectionRepo: collectionRepo}
}

// Execute returns all collections
func (uc *ListUseCase) Execute() ([]*collection.Collection, error) {
	return uc.collectionRepo.List()
}
