<?php

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

use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\ConditionalLogic\Conditions\Abstraction\Condition;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\ConditionalLogic\Conditions\Abstraction\ConditionOperator;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\ConditionalLogic\Conditions\Abstraction\ConditionWithValue;
class IsNotInTagCondition implements Condition, ConditionWithValue, ConditionOperator
{
    public const SEPARATOR = '|';
    private string $value = '';
    public function is_valid($field_value): bool
    {
        $values = $this->get_values();
        if (!is_array($field_value)) {
            return \false;
        }
        foreach ($field_value as $value) {
            if (\in_array($value, $values)) {
                return \false;
            }
        }
        return \true;
    }
    public static function get_operator(): string
    {
        return 'NOT IN';
    }
    public static function get_operator_value($value): string
    {
        return $value;
    }
    public static function get_name(): string
    {
        return 'notintag';
    }
    public static function get_nice_name(): string
    {
        return __('is not in', 'dropshipping-export-free');
    }
    public function set_value(string $value)
    {
        $this->value = $value;
    }
    public function get_values(): array
    {
        return \explode(self::SEPARATOR, $this->value);
    }
    public function has_multiple_values(): bool
    {
        return count($this->get_values()) > 1;
    }
}
