<?php

if ( !defined( 'ABSPATH' ) ) {
    exit;
}

if ( !class_exists( 'Reon' ) ) {

    return;
}

if ( !class_exists( 'Pricely_Admin_Product_Promotion_Type_Groups' ) ) {

    class Pricely_Admin_Product_Promotion_Type_Groups {

        private static $instance;

        public static function get_instance(): self {

            if ( !self::$instance ) {

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

            return self::$instance;
        }

        public function __construct() {

            add_filter( 'pricely_admin_product-promotions_get-promotion-type-groups', array( $this, 'get_groups' ), 10, 2 );
        }

        public function get_groups( $in_groups, $args ) {

            $in_groups[ 'main' ] = esc_html__( 'Promotion Settings', 'pricely-dynamic-pricing-cart-discounts' );
            
            return $in_groups;
        }

    }

    Pricely_Admin_Product_Promotion_Type_Groups::get_instance();
}
