package collection

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

type ListRootUseCase struct {
	collectionRepo collection.Repository
}

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

// Execute returns all root-level collections (no parent)
func (uc *ListRootUseCase) Execute() ([]*collection.Collection, error) {
	return uc.collectionRepo.ListRoot()
}
