<?php

namespace DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\PriceCompare\Config;

use DropshippingExportFreeVendor\Composer\Util\Url;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\Form\CategoriesCeneoForm;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\PriceCompare\ProductFields\Ceneo\AttributesProductField;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\PriceCompare\ProductFields\Ceneo\AvailProductField;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\PriceCompare\ProductFields\Ceneo\CategoryProductField;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\PriceCompare\ProductFields\Ceneo\DescriptionProductField;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\PriceCompare\ProductFields\Ceneo\IdProductField;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\PriceCompare\ProductFields\Ceneo\ImagesProductField;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\PriceCompare\ProductFields\Ceneo\NameProductField;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\PriceCompare\ProductFields\Ceneo\PriceProductField;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\PriceCompare\ProductFields\Ceneo\StockProductField;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\PriceCompare\PriceCompareAttribute;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\PriceCompare\PriceCompareCategory;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\PriceCompare\Categories\CeneoCategories;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\PriceCompare\PriceCompareAttributeConfig;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\PriceCompare\PriceCompareConfig;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\PriceCompare\PriceCompareCategoryConfig;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\DataProvider\CategoryCeneoDataProvider;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\Form\AttributesCeneoForm;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\DataProvider\AttributeCeneoDataProvider;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\DataProvider\CeneoExportMapperDataProvider;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\Form\CeneoExportMapperForm;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\PriceCompare\ProductFields\Ceneo\UrlProductField;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\PriceCompare\ProductFields\Ceneo\WeightProductField;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\Service\Writer\XML\CeneoXmlWriter;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\Integration\GpsrIntegration;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\PriceCompare\ProductFields\Ceneo\GpsrProductField;
class CeneoConfig implements PriceCompareConfig, PriceCompareCategoryConfig, PriceCompareAttributeConfig
{
    public const ID = 'ceneo';
    public const EXTENSION = 'xml';
    private CeneoCategories $categories;
    public function __construct(CeneoCategories $categories)
    {
        $this->categories = $categories;
    }
    public function get_supported_extension(): string
    {
        return self::EXTENSION;
    }
    public function get_mapper_template_name(): string
    {
        return 'Export/CeneoExportMapper';
    }
    public function get_mapper_form_class(): string
    {
        return CeneoExportMapperForm::class;
    }
    public function get_mapper_data_provider_class(): string
    {
        return CeneoExportMapperDataProvider::class;
    }
    public function is_custom(): bool
    {
        return \false;
    }
    public function get_category_template_name(): string
    {
        return 'Settings/Categories';
    }
    public function get_attribute_template_name(): string
    {
        return 'Settings/Attributes';
    }
    public function get_category_form_class(): string
    {
        return CategoriesCeneoForm::class;
    }
    public function get_category_data_provider_class(): string
    {
        return CategoryCeneoDataProvider::class;
    }
    public function get_attribute_form_class(): string
    {
        return AttributesCeneoForm::class;
    }
    public function get_attribute_data_provider_class(): string
    {
        return AttributeCeneoDataProvider::class;
    }
    public function get_id(): string
    {
        return self::ID;
    }
    public function get_name(): string
    {
        return \esc_html__('Ceneo', 'dropshipping-export-free');
    }
    public function get_writer_class_name(): string
    {
        return CeneoXmlWriter::class;
    }
    public function get_category(): PriceCompareCategory
    {
        return $this->categories;
    }
    public function get_attribute(): PriceCompareAttribute
    {
        return $this->categories;
    }
    public function get_supported_fields(): array
    {
        $fields = [IdProductField::class, NameProductField::class, DescriptionProductField::class, PriceProductField::class, StockProductField::class, WeightProductField::class, AvailProductField::class, CategoryProductField::class, ImagesProductField::class, AttributesProductField::class, UrlProductField::class];
        if (GpsrIntegration::is_active()) {
            $fields[] = GpsrProductField::class;
        }
        return $fields;
    }
}
