package adminkindboxservice

import (
	"context"

	"git.gocasts.ir/ebhomengo/niki/entity"
	params "git.gocasts.ir/ebhomengo/niki/param"
	adminbenefactoraggsvc "git.gocasts.ir/ebhomengo/niki/service/admin/benefactor_aggregator"
	validator "git.gocasts.ir/ebhomengo/niki/validator/admin/kind_box"
)

type Repository interface {
	GetKindBox(ctx context.Context, kindBoxID uint) (entity.KindBox, error)
	AssignReceiverAgent(ctx context.Context, kindBox entity.KindBox) error
	GetAllKindBox(ctx context.Context, filter params.FilterRequest, pagination params.PaginationRequest, sort params.SortRequest, searchParams *params.QuerySearch) ([]entity.KindBox, uint, error)
	EnumerateKindBox(ctx context.Context, kindBoxID uint, amount uint) error
	UpdateKindBox(ctx context.Context, KindBox entity.KindBox) error
}

type Service struct {
	repo             Repository
	benefactorAggSvc adminbenefactoraggsvc.Service
	vld              validator.Validator
}

func New(repo Repository, benefactorAggSvc adminbenefactoraggsvc.Service, vld validator.Validator) Service {
	return Service{
		repo:             repo,
		benefactorAggSvc: benefactorAggSvc,
		vld:              vld,
	}
}
