<?php

declare(strict_types=1);

namespace Drupal\native_observability_otel\Plugin\NativeObservabilityExporter;

use Drupal\Component\Plugin\PluginBase;

/**
 * Base class for Native Observability exporter plugins.
 */
abstract class ExporterBase extends PluginBase implements ExporterInterface {

  /**
   * {@inheritdoc}
   */
  public function getLabel(): string {
    return (string) ($this->pluginDefinition['label'] ?? $this->getPluginId());
  }

  /**
   * {@inheritdoc}
   */
  public function getDescription(): string {
    return (string) ($this->pluginDefinition['description'] ?? '');
  }

  /**
   * {@inheritdoc}
   */
  public function isAvailable(): bool {
    return TRUE;
  }

}
