<?php

namespace Easymailing\App\Core\Provider\Woocommerce\Model;

class BatchOperationIdentifier
{

	const STORE = 'store';
	const CUSTOMER = 'customer';
	const GUEST_CUSTOMER = 'guest_customer';
	const CATEGORY = 'category';
	const PRODUCT = 'product';
	const VARIANT = 'variant';
	const VARIANT_SIMPLE = 'variant_simple';
	const ORDER = 'order';

	public static function buildIdentifier($type, $id): string
	{
		return sprintf('%s-%s', $type, $id);
	}

	public static function getIdentifierType($identifier): string
	{
		return explode('-', $identifier)[0];
	}

	public static function getIdentifierId($identifier): string
	{
		return explode('-', $identifier)[1];
	}



}
