<?php

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

class SynchronizationStatus
{

	const PENDING = 'pending';
	const SUCCESS = 'success';
	const ERROR = 'error';
	const SKIPPED = 'skipped';

	public static function getStatuses(): array
	{
		return [
			self::PENDING,
			self::SUCCESS,
			self::ERROR,
			self::SKIPPED,
		];
	}

	public static function getTitle($status): string
	{
		switch($status) {
			case self::PENDING:
				return __( 'Pendiente', 'easymailing' );
			case self::SUCCESS:
				return __( 'Sincronizado', 'easymailing' );
			case self::ERROR:
				return __( 'Error', 'easymailing' );
			case self::SKIPPED:
				return __( 'No sincronizable', 'easymailing' );
			default:
				return __( 'No sincronizado', 'easymailing' );
		}
	}


	public static function getClass($status): string
	{
		switch($status) {
			case self::PENDING:
				return 'warning';
			case self::SUCCESS:
				return 'success';
			case self::ERROR:
				return 'danger';
			case self::SKIPPED:
				return 'warning';
			default:
				return 'warning';
		}
	}

}
