namespace Creatuity\Interception\Test\Integration\CompiledInterceptor\Custom\Module\Model\Item;

use Magento\Framework\Config\ScopeInterface;
use Magento\Framework\ObjectManagerInterface;

/**
 * Interceptor class for @see \Creatuity\Interception\Test\Integration\CompiledInterceptor\Custom\Module\Model\Item
 */
class Interceptor extends \Creatuity\Interception\Test\Integration\CompiledInterceptor\Custom\Module\Model\Item
{
    /**
     * @var ScopeInterface
     */
    private $____scope = null;

    /**
     * @var ObjectManagerInterface
     */
    private $____om = null;

    /**
     * @var \Creatuity\Interception\Test\Integration\CompiledInterceptor\Custom\Module\Model\ItemPlugin\Simple
     */
    private $____plugin_simple_plugin = null;

    /**
     * @var \Creatuity\Interception\Test\Integration\CompiledInterceptor\Custom\Module\Model\ItemPlugin\Advanced
     */
    private $____plugin_advanced_plugin = null;

    /**
     * {@inheritdoc}
     */
    public function __construct(\Magento\Framework\ObjectManagerInterface $____om, \Magento\Framework\Config\ScopeInterface $____scope)
    {
        $this->____om = $____om;
        $this->____scope = $____scope;
    }

    /**
     * {@inheritdoc}
     */
    public function getName()
    {
        switch ($this->____scope->getCurrentScope()) {
        	case 'global':
        	case 'emptyscope':
        		$result = parent::getName();
        		
        		return (($tmp = $this->____plugin_simple_plugin()->afterGetName($this, $result)) !== null) ? $tmp : $result;
        	default:
        		$this->____plugin_advanced_plugin()->beforeGetName($this);
        		
        		$result = $this->____plugin_advanced_plugin()->aroundGetName($this, function(){
        			$result = parent::getName();
        			
        			return (($tmp = $this->____plugin_simple_plugin()->afterGetName($this, $result)) !== null) ? $tmp : $result;
        		});
        		
        		return (($tmp = $this->____plugin_advanced_plugin()->afterGetName($this, $result)) !== null) ? $tmp : $result;
        }
    }

    /**
     * plugin "simple_plugin"
     * @return \Creatuity\Interception\Test\Integration\CompiledInterceptor\Custom\Module\Model\ItemPlugin\Simple
     */
    private function ____plugin_simple_plugin() : \Creatuity\Interception\Test\Integration\CompiledInterceptor\Custom\Module\Model\ItemPlugin\Simple
    {
        if ($this->____plugin_simple_plugin === null) {
        	$this->____plugin_simple_plugin = $this->____om->get(\Creatuity\Interception\Test\Integration\CompiledInterceptor\Custom\Module\Model\ItemPlugin\Simple::class);
        }
        return $this->____plugin_simple_plugin;
    }

    /**
     * plugin "advanced_plugin"
     * @return \Creatuity\Interception\Test\Integration\CompiledInterceptor\Custom\Module\Model\ItemPlugin\Advanced
     */
    private function ____plugin_advanced_plugin() : \Creatuity\Interception\Test\Integration\CompiledInterceptor\Custom\Module\Model\ItemPlugin\Advanced
    {
        if ($this->____plugin_advanced_plugin === null) {
        	$this->____plugin_advanced_plugin = $this->____om->get(\Creatuity\Interception\Test\Integration\CompiledInterceptor\Custom\Module\Model\ItemPlugin\Advanced::class);
        }
        return $this->____plugin_advanced_plugin;
    }
}
