<?php

declare(strict_types=1);

namespace Drupal\node_view_mode\Matcher;

use Drupal\Core\Entity\EntityInterface;

/**
 * Defines the interface for display mode matchers.
 */
interface DisplayModeMatcherInterface {

  /**
   * Handles the form mode matching.
   *
   * @param string $mode
   *   The form mode to match.
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   The entity related to the form display.
   *
   * @return string|null
   *   The matched mode or null.
   */
  public function matchViewForModeAndEntity(
    string $mode,
    EntityInterface $entity,
  ): ?string;

}
