package collection

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

type ListByParentUseCase struct {
	collectionRepo collection.Repository
}

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

// Execute returns all collections with a specific parent ID
func (uc *ListByParentUseCase) Execute(parentID string) ([]*collection.Collection, error) {
	return uc.collectionRepo.ListByParent(parentID)
}
