package file

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

type ListByStatusUseCase struct {
	fileRepo file.Repository
}

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

// Execute returns all files with a specific sync status
func (uc *ListByStatusUseCase) Execute(status file.SyncStatus) ([]*file.File, error) {
	return uc.fileRepo.ListByStatus(status)
}
