<?php

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

use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\ConditionalLogic\Fields\Abstraction\WPPostsMetaField;
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\EqualCondition;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\ConditionalLogic\Conditions\HigherCondition;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\ConditionalLogic\Conditions\LowerCondition;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\ConditionalLogic\Fields\Abstraction\DataType;
use WC_Product;
class PriceField implements Field, WPPostsMetaField, AllowedConditions, DataType
{
    const DATA_TYPE_NUMERIC = 'NUMERIC';
    public function get_data_type(): string
    {
        return self::DATA_TYPE_NUMERIC;
    }
    public static function get_allowed_conditions(): array
    {
        return [HigherCondition::class, LowerCondition::class, EqualCondition::class];
    }
    public static function get_name(): string
    {
        return 'price';
    }
    public static function get_nice_name(): string
    {
        return __('Price', 'dropshipping-export-free');
    }
    public static function get_meta_key(): string
    {
        return '_regular_price';
    }
    public function get_product_value(WC_Product $product)
    {
        return $product->get_regular_price();
    }
}
