<?php

namespace DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\ConditionalLogic\Fields;

use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\ConditionalLogic\Fields\Abstraction\WPTaxonomyField;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\ConditionalLogic\Fields\Abstraction\Field;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\ConditionalLogic\Fields\Abstraction\AllowedConditions;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\ConditionalLogic\Conditions\IsInTagCondition;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\ConditionalLogic\Conditions\IsNotInTagCondition;
use WC_Product;
class TagsField implements Field, WPTaxonomyField, AllowedConditions
{
    public static function get_allowed_conditions(): array
    {
        return [IsInTagCondition::class, IsNotInTagCondition::class];
    }
    public static function get_name(): string
    {
        return 'tags';
    }
    public static function get_nice_name(): string
    {
        return __('Tag name', 'dropshipping-export-free');
    }
    public static function get_taxonomy(): string
    {
        return 'product_tag';
    }
    public static function get_taxonomy_field(): string
    {
        return 'term_id';
    }
    public function get_product_value(WC_Product $product)
    {
        return $product->get_tag_ids();
    }
}
