package file

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

type CreateUseCase struct {
	fileRepo file.Repository
}

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

// Execute creates a new file record
func (uc *CreateUseCase) Execute(f *file.File) error {
	return uc.fileRepo.Create(f)
}
