<reasoning_content>
*   Goal: Implement a priority-based job queue.
    *   Requirements:
        1.  `add_job(name, metadata, priority=0)`: Add a job.
        2.  Higher priority first (Critical=2 > High=1 > Normal=0).
        3.  Same priority $\rightarrow$ FIFO (First-In-First-Out).
        4.  `get_next_job() -> tuple[str, dict] | None`: Retrieve highest priority job.
    *   Constraint: Write only Python code, no explanations.

    *   A standard priority queue (like `heapq` in Python) uses a min-heap.
    *   Since we want *higher* priority values to come first, we can store the priority as a negative number in a min-heap.
    *   To handle the FIFO requirement for equal priorities, we need a secondary sort key: a monotonically increasing sequence number (counter).
    *   The element stored in the heap should be: `(-priority, sequence_number, job_name, metadata)`.

    *   `heapq` for the priority queue.
    *   `itertools.count()` for the sequence number.

    *   `import heapq`
    *   `import itertools`
    *   `class JobQueue:`
    *   `def __init__(self): self.queue = []; self.counter = itertools.count()`
    *   `def add_job(self, name, metadata, priority=0):`
        *   `count = next(self.counter)`
        *   `heapq.heappush(self.queue, (-priority, count, name, metadata))`
    *   `def get_next_job(self):`
        *   `if not self.queue: return None`
        *   `_, _, name, metadata = heapq.heappop(self.queue)`
        *   `return (name, metadata)`

    *   `priority=2`: `-2`
    *   `priority=1`: `-1`
    *   `priority=0`: `0`
    *   Heap order: `-2 < -1 < 0`. This works perfectly for a min-heap to extract the highest priority first.
    *   FIFO: If priorities are the same, the `count` (0, 1, 2...) ensures the one added earlier is popped first.

    *   `add_job("normal", {"type": "normal"}, priority=0)` -> `(0, 0, "normal", {"type": "normal"})`
    *   `add_job("critical", {"type": "critical"}, priority=2)` -> `(-2, 1, "critical", {"type": "critical"})`
    *   `add_job("high", {"type": "high"}, priority=1)` -> `(-1, 2, "high", {"type": "high"})`
    *   Heap pop: `(-2, 1, ...)` -> `"critical"`
    *   Heap pop: `(-1, 2, ...)` -> `"high"`
    *   Heap pop: `(0, 0, ...)` -> `"normal"`

    *This matches the logic.*

    *   Python code only.
    *   No explanations.
</reasoning_content>

<content>
```python
import heapq
import itertools

class JobQueue:
    def __init__(self):
        self._queue = []
        self._counter = itertools.count()

    def add_job(self, name: str, metadata: dict, priority: int = 0):
        """
        Adds a job to the queue.
        Higher priority values are processed first.
        Jobs with same priority follow FIFO.
        """
        # We use -priority because heapq is a min-heap, 
        # but we want higher priority numbers to come out first.
        # We use self._counter to ensure FIFO for identical priorities.
        count = next(self._counter)
        heapq.heappush(self._queue, (-priority, count, name, metadata))

    def get_next_job(self) -> tuple[str, dict] | None:
        """
        Returns the highest priority job as (name, metadata).
        Returns None if the queue is empty.
        """
        if not self._queue:
            return None
        
        _, _, name, metadata = heapq.heappop(self._queue)
        return (name, metadata)
```
</content>