<?php
namespace Webkul\MobikulCore\Setup\Patch\Data;

use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Framework\Setup\Patch\DataPatchInterface;

class UpdateAttr implements DataPatchInterface
{
   /** @var ModuleDataSetupInterface */
   private $moduleDataSetup;

   /** @var EavSetupFactory */
   private $eavSetupFactory;

   /**
    * @param ModuleDataSetupInterface $moduleDataSetup
    * @param EavSetupFactory $eavSetupFactory
    */
   public function __construct(
       ModuleDataSetupInterface $moduleDataSetup,
       EavSetupFactory $eavSetupFactory
   ) {
       $this->moduleDataSetup = $moduleDataSetup;
       $this->eavSetupFactory = $eavSetupFactory;
   }

   /**
    * {@inheritdoc}
    */
   public function apply()
   {
    // $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/custom.log');
    // $logger = new \Zend\Log\Logger();
    // $logger->addWriter($writer);
    // $logger->info('Custom updateattr');
    //    /** @var EavSetup $eavSetup */
    //    $eavSetup = $this->eavSetupFactory->create(['setup' => $this->moduleDataSetup]);

    //    $eavSetup->addAttribute(
    //     \Magento\Catalog\Model\Product::ENTITY,
    //     'ar_texture_image',
    //     [
    //         'group' => 'Mobikul Configuration',
    //         'type' => 'text',
    //         'label' => 'Texture Images',
    //         'input' => 'file',
    //         'backend' => '',
    //         'frontend' => '',
    //         'class' => '',
    //         'source' => '',
    //         'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
    //         'visible' => false,
    //         'required' => false,
    //         'user_defined' => false,
    //         'default' => '',
    //         'searchable' => false,
    //         'filterable' => false,
    //         'comparable' => false,
    //         'visible_on_front' => false,
    //         'unique' => false,
    //         'apply_to' => 'simple,configurable',
    //         'used_in_product_listing' => false,
    //         'sort_order' => 6
    //     ]
    // );
   }

   /**
    * {@inheritdoc}
    */
   public static function getDependencies()
   {
       return [];
   }

   /**
    * {@inheritdoc}
    */
   public function getAliases()
   {
       return [];
   }

   /**
   * {@inheritdoc}
   */
   public static function getVersion()
   {
      return '2.0.0';
   }
}