package file

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

type ListByCollectionUseCase struct {
	fileRepo file.Repository
}

// ProvideListByCollectionUseCase creates the use case for Wire
func ProvideListByCollectionUseCase(fileRepo file.Repository) *ListByCollectionUseCase {
	return &ListByCollectionUseCase{fileRepo: fileRepo}
}

// Execute returns all files for a specific collection
func (uc *ListByCollectionUseCase) Execute(collectionID string) ([]*file.File, error) {
	return uc.fileRepo.ListByCollection(collectionID)
}
