<?php
namespace Solwin\Verticalmenu\Setup;

class MenuSetup
{
    /**
     * Setup instance
     * 
     * @var \Magento\Framework\Setup\ModuleDataSetupInterface
     */
    protected $setup;

    /**
     * Menu Factory
     * 
     * @var \Solwin\Verticalmenu\Model\MenuFactory
     */
    protected $menuFactory;

    /**
     * constructor
     * 
     * @param \Magento\Framework\Setup\ModuleDataSetupInterface $setup
     * @param \Solwin\Verticalmenu\Model\MenuFactory $menuFactory
     */
    public function __construct(
        \Magento\Framework\Setup\ModuleDataSetupInterface $setup,
        \Solwin\Verticalmenu\Model\MenuFactory $menuFactory
    )
    {
        $this->setup       = $setup;
        $this->menuFactory = $menuFactory;
    }


    /**
     * Creates Menu model
     *
     * @param array $data
     * @return \Solwin\Verticalmenu\Model\Menu
     */
    public function createMenu($data = [])
    {
        return $this->menuFactory->create($data);
    }
}
