<?php

if ( !defined( 'ABSPATH' ) ) {

    exit;
}

if ( !class_exists( 'Pricely_Quantity_Util' ) ) {

    require_once dirname( __FILE__ ) . '/quantity-range-util.php';

    class Pricely_Quantity_Util {

        private static $instance;
        private $range_util;

        public static function get_instance(): self {

            if ( !self::$instance ) {

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

            return self::$instance;
        }

        public function __construct() {

            $this->range_util = new Pricely_Range_Util();
        }

        public function get_bulk_items( $qty, $items, $ranges ) {

            return $this->range_util->get_bulk_items( $qty, $items, $ranges );
        }

        public function process_ranges( $ranges, $add_excluded_ranges ) {

            return $this->range_util->process_ranges( $ranges, $add_excluded_ranges );
        }

    }

}