<?php
namespace Mirasvit\Search\Plugin\Frontend\BotDetectorPlugin;

/**
 * Interceptor class for @see \Mirasvit\Search\Plugin\Frontend\BotDetectorPlugin
 */
class Interceptor extends \Mirasvit\Search\Plugin\Frontend\BotDetectorPlugin implements \Magento\Framework\Interception\InterceptorInterface
{
    use \Magento\Framework\Interception\Interceptor;

    public function __construct(\Mirasvit\Search\Service\BotDetectorService $botDetectorService)
    {
        $this->___init();
        parent::__construct($botDetectorService);
    }

    /**
     * {@inheritdoc}
     */
    public function load(\Magento\Framework\Model\AbstractModel $object, $value, $field = null)
    {
        $pluginInfo = $this->pluginList->getNext($this->subjectType, 'load');
        return $pluginInfo ? $this->___callPlugins('load', func_get_args(), $pluginInfo) : parent::load($object, $value, $field);
    }

    /**
     * {@inheritdoc}
     */
    public function saveIncrementalPopularity(\Magento\Search\Model\Query $query)
    {
        $pluginInfo = $this->pluginList->getNext($this->subjectType, 'saveIncrementalPopularity');
        return $pluginInfo ? $this->___callPlugins('saveIncrementalPopularity', func_get_args(), $pluginInfo) : parent::saveIncrementalPopularity($query);
    }

    /**
     * {@inheritdoc}
     */
    public function saveNumResults(\Magento\Search\Model\Query $query)
    {
        $pluginInfo = $this->pluginList->getNext($this->subjectType, 'saveNumResults');
        return $pluginInfo ? $this->___callPlugins('saveNumResults', func_get_args(), $pluginInfo) : parent::saveNumResults($query);
    }

    /**
     * {@inheritdoc}
     */
    public function save(\Magento\Framework\Model\AbstractModel $object)
    {
        $pluginInfo = $this->pluginList->getNext($this->subjectType, 'save');
        return $pluginInfo ? $this->___callPlugins('save', func_get_args(), $pluginInfo) : parent::save($object);
    }

    /**
     * {@inheritdoc}
     */
    public function delete(\Magento\Framework\Model\AbstractModel $object)
    {
        $pluginInfo = $this->pluginList->getNext($this->subjectType, 'delete');
        return $pluginInfo ? $this->___callPlugins('delete', func_get_args(), $pluginInfo) : parent::delete($object);
    }
}
