/*
 * Copyright 2026 Oleg Borodin <onborodin@gmail.com>
 */
package imageoper

import (
	"mstore/app/locker"
	"mstore/app/logger"
	"mstore/app/maindb"
	"mstore/app/storage"
)

type OperatorParams struct {
	MainDB *maindb.Database
	Store  *storage.Storage
}

type Operator struct {
	mdb   *maindb.Database
	store *storage.Storage
	logg  *logger.Logger
	iLock *locker.Locker
}

func NewOperator(params *OperatorParams) (*Operator, error) {
	var err error
	oper := &Operator{
		mdb:   params.MainDB,
		store: params.Store,
	}
	oper.iLock = locker.NewLocker()
	oper.logg = logger.NewLoggerWithSubject("imageoper")
	return oper, err
}
