# Reactivate Product

<!-- User story defining a specific requirement within a business flow.
The name of the story should start with the actor followed by `--` and the story name.
 -->

<!-- This section should contain the following subsections in order: -->
<!-- 1. ## User Story (required) -->
<!-- 2. ## Story Diagram (required) -->
<!-- 3. ## Scenario Patterns (required) -->
<!-- 4. ## Test Cases (required) -->
<!-- 5. ## Screens (required) -->
<!-- 6. ## Resolvers (required) -->

## User Story

<!-- Define the user story in the format:
As a [role], I want [goal], so that [benefit].
 -->

As a product manager, I want to reactivate an ARCHIVED product, so that it returns to ACTIVE status and becomes available for use again.

## Story Diagram

<!-- Mermaid flowchart showing user interactions with screens.
Focus on actors, UI screens, and business outcomes.
Avoid technical details (APIs, databases, endpoints).
 -->

<!-- Code block requirements: -->
<!-- Minimum 1 mermaid code blocks required -->

```mermaid
flowchart TD
    A([Product Manager]) --> B[Product Detail Screen]
    B --> C{Product Status?}
    C -- Not ARCHIVED --> D[Show Error: Only ARCHIVED Products Can Be Reactivated]
    C -- ARCHIVED --> E[Confirm Reactivation]
    E --> F[Product Status Set to ACTIVE]
    F --> G[Product Detail Screen]
    D --> B
```

## Scenario Patterns

<!-- List requirements: -->
<!-- Minimum 1 unordered lists required -->
<!-- Minimum 1 items per list -->

- Product manager reactivates an ARCHIVED product; the status transitions back to ACTIVE.
- Product manager attempts to reactivate a DRAFT product; an error is shown and no change is made.
- Product manager attempts to reactivate an already ACTIVE product; an error is shown and no change is made.

## Test Cases

<!-- List requirements: -->
<!-- Minimum 1 items per list -->

- Given an ARCHIVED product, when reactivation is confirmed, then the product status becomes ACTIVE.
- Given a DRAFT product, when reactivation is attempted, then an error is shown and status remains unchanged.
- Given an ACTIVE product, when reactivation is attempted, then an error is shown and status remains unchanged.

## Screens

<!-- Link to screen docs that implement this story's UI.
 -->

<!-- List requirements: -->
<!-- Minimum 1 unordered lists required -->
<!-- Minimum 1 items per list -->

- [product-detail](../../../screen/product-detail.md)

## Resolvers

<!-- Link to resolver docs that implement this story's backend operations.
Write "None" if this story does not require any resolvers.
 -->

<!-- List requirements: -->
<!-- Minimum 1 items per list -->

- [reactivateProduct](../../../resolver/reactivateProduct.md)
