<?php
declare(strict_types=1);

// THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY.

namespace Automattic\WooCommerce\Internal\Api\Autogenerated\GraphQLTypes\Input;

use Automattic\WooCommerce\Internal\Api\Autogenerated\GraphQLTypes\Enums\ProductStatus as ProductStatusType;
use Automattic\WooCommerce\Internal\Api\Autogenerated\GraphQLTypes\Enums\StockStatus as StockStatusType;
use Automattic\WooCommerce\Api\Infrastructure\Schema\InputObjectType;
use Automattic\WooCommerce\Api\Infrastructure\Schema\Type;

class ProductFilter {
	private static ?InputObjectType $instance = null;

	public static function get(): InputObjectType {
		if ( null === self::$instance ) {
			self::$instance = new InputObjectType(
				array(
					'name'        => 'ProductFilterInput',
					'description' => __( 'Filter criteria for listing products.', 'woocommerce' ),
					'fields'      => fn() => array(
						'status'       => array(
							'type'        => ProductStatusType::get(),
							'description' => __( 'Filter by product status.', 'woocommerce' ),
						),
						'stock_status' => array(
							'type'        => StockStatusType::get(),
							'description' => __( 'Filter by stock status.', 'woocommerce' ),
						),
						'search'       => array(
							'type'        => Type::string(),
							'description' => __( 'Search products by keyword.', 'woocommerce' ),
						),
					),
				)
			);
		}
		return self::$instance;
	}
}
