package adminkindboxreqservice

import (
	"context"

	"git.gocasts.ir/ebhomengo/niki/entity"
	paginationparam "git.gocasts.ir/ebhomengo/niki/param"
	param "git.gocasts.ir/ebhomengo/niki/param/admin/kind_box"
)

type Repository interface {
	AcceptKindBoxReq(ctx context.Context, kindBoxReqID uint, countAccepted uint) error
	GetByID(ctx context.Context, id uint) (entity.KindBoxReq, error)
	RejectKindBoxReq(ctx context.Context, kindBoxReqID uint, description string) error
	RollbackKindBoxRequestStatus(ctx context.Context, id uint) error
	GetAllKindBoxReq(ctx context.Context, pagination paginationparam.PaginationRequest) ([]entity.KindBoxReq, paginationparam.PaginationResponse, error)
	AssignSenderAgentToKindBoxReq(ctx context.Context, kindBoxReqID uint, senderAgentID uint) error
	DeliverKindBoxReq(ctx context.Context, kindBoxReqID uint) error
}

type KindBoxSvc interface {
	AddBatchKindBox(ctx context.Context, req param.AddKindBoxRequest) (param.AddKindBoxResponse, error)
}

type Service struct {
	repo       Repository
	kindBoxSvc KindBoxSvc
}

func New(repository Repository, kindBoxSvc KindBoxSvc) Service {
	return Service{
		repo:       repository,
		kindBoxSvc: kindBoxSvc,
	}
}
