<reasoning_content>
*   Goal: Implement priority-based job scheduling for a `JobQueue` class.
    *   Requirements:
        1. `add_job(name, data, priority=0)`: Add job with a priority.
        2. Higher priority (higher number) jobs first.
        3. Same priority = FIFO (First In, First Out).
        4. `get_next_job() -> tuple[str, dict] | None`: Get and remove the highest priority job.
    *   Priority levels: 0 (Normal), 1 (High), 2 (Critical).

    *   A list or a priority queue?
    *   Standard `heapq` in Python is a min-heap.
    *   Requirement: Higher priority (2) comes before lower priority (0).
    *   Requirement: FIFO for same priority.
    *   To handle FIFO with `heapq`, we need a sequence number/timestamp.
    *   Since we want "Higher priority" first, and `heapq` is a min-heap, we can store priority as a negative number (e.g., -2, -1, 0). Or simply use a custom comparison, but `heapq` is easiest with negative numbers.

    *   `self.jobs = []` (the heap)
    *   `self.counter = 0` (to maintain FIFO for same priority)

    *   `add_job(name, data, priority=0)`:
        *   `heapq.heappush(self.jobs, (-priority, self.counter, name, data))`
        *   `self.counter += 1`

    *   `get_next_job()`:
        *   If `self.jobs` is empty, return `None`.
        *   `neg_priority, count, name, data = heapq.heappop(self.jobs)`
        *   Return `(name, data)`.

    *   `priority=2` -> `(-2, count, ...)`
    *   `priority=1` -> `(-1, count, ...)`
    *   `priority=0` -> `(0, count, ...)`
    *   `heapq` will pick the smallest value first.
    *   `-2` < `-1` < `0`. Correct.
    *   If priority is the same (e.g., -2), it compares the next element in the tuple: `count`.
    *   `count` increments every time, so the smaller count (earlier job) comes first. Correct.

    *   Import `heapq`.
    *   Define `JobQueue`.
    *   Implement `add_job`.
    *   Implement `get_next_job`.

    ```python
    import heapq

    class JobQueue:
        def __init__(self):
            self.jobs = []
            self.counter = 0

        def add_job(self, name: str, data: dict, priority: int = 0):
            # Use negative priority because heapq is a min-heap
            # Use counter to maintain FIFO for same priority
            heapq.heappush(self.jobs, (-priority, self.counter, name, data))
            self.counter += 1

        def get_next_job(self) -> tuple[str, dict] | None:
            if not self.jobs:
                return None
            neg_priority, count, name, data = heapq.heappop(self.jobs)
            return (name, data)
    ```

    *   `add_job` accepts priority? Yes.
    *   Higher priority processed first? Yes (via negative numbers).
    *   Same priority FIFO? Yes (via counter).
    *   `get_next_job` returns `tuple[str, dict] | None`? Yes.

    Wait, the prompt asks to "Modify `add_job` ...". It implies there might be an existing class structure, but since no base code was provided, I'll provide the standard class implementation.

    Let's double check the priority logic.
    - `priority=2` (Critical) -> `-2`
    - `priority=1` (High) -> `-1`
    - `priority=0` (Normal) -> `0`
    Heap order: `-2`, then `-1`, then `0`. Correct.

    If same priority:
    - Job A: `(-2, 0, "A", {})`
    - Job B: `(-2, 1, "B", {})`
    Heap order: Job A then Job B. Correct.
</reasoning_content>

<content>
```python
import heapq

class JobQueue:
    def __init__(self):
        self.jobs = []
        self.counter = 0

    def add_job(self, name: str, data: dict, priority: int = 0):
        # Use negative priority because heapq is a min-heap
        # self.counter ensures FIFO order for jobs with the same priority
        heapq.heappush(self.jobs, (-priority, self.counter, name, data))
        self.counter += 1

    def get_next_job(self) -> tuple[str, dict] | None:
        if not self.jobs:
            return None
        
        neg_priority, count, name, data = heapq.heappop(self.jobs)
        return (name, data)
```
</content>