package file

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

type ListUseCase struct {
	fileRepo file.Repository
}

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

// Execute returns all files
func (uc *ListUseCase) Execute() ([]*file.File, error) {
	return uc.fileRepo.List()
}
