<?php

if ( !defined( 'ABSPATH' ) ) {

    exit;
}


if ( !class_exists( 'Pricely_Admin_Logic_Types_Taxonomy' ) ) {

    class Pricely_Admin_Logic_Types_Taxonomy {

        private static $instance;
        private $taxonomies;

        public static function get_instance(): self {

            if ( is_null( self::$instance ) ) {

                self::$instance = new self();
            }

            return self::$instance;
        }

        public function get_taxonomies() {

            if ( !is_null( $this->taxonomies ) ) {

                return $this->taxonomies;
            }

            $this->taxonomies = array();

            $this->taxonomies[ 'product_cat' ] = array(
                'label_singular' => esc_html__( 'Category', 'pricely-dynamic-pricing-cart-discounts' ),
                'label_plural' => esc_html__( 'Categories', 'pricely-dynamic-pricing-cart-discounts' ),
                'label_field' => esc_html__( 'Product Categories', 'pricely-dynamic-pricing-cart-discounts' )
            );

            $this->taxonomies[ 'product_tag' ] = array(
                'label_singular' => esc_html__( 'Tag', 'pricely-dynamic-pricing-cart-discounts' ),
                'label_plural' => esc_html__( 'Tags', 'pricely-dynamic-pricing-cart-discounts' ),
                'label_field' => esc_html__( 'Product Tags', 'pricely-dynamic-pricing-cart-discounts' )
            );
            
            $this->taxonomies[ 'product_brand' ] = array(
                'label_singular' => esc_html__( 'Brand', 'pricely-dynamic-pricing-cart-discounts' ),
                'label_plural' => esc_html__( 'Brands', 'pricely-dynamic-pricing-cart-discounts' ),
                'label_field' => esc_html__( 'Product Brands', 'pricely-dynamic-pricing-cart-discounts' )
            );

            return $this->taxonomies;
        }

    }

}