from typing import Dict
from typing import Optional
from datetime import datetime
from typing import Any


def generate_describe_stacks_stack(
    stack_name: str,
    outputs: Dict[str, str],
    creation_time: Optional[datetime] = None,
    stack_status: str = "CREATE_COMPLETE",
) -> Dict[str, Any]:
    """Generate describe stacks stack.

    Args:
        stack_name: Name of the stack.
        outputs: Dictionary to be converted to stack outputs.
        creation_time (Optional[datetime.datetime]): Stack creation time.
        stack_status: Current stack status.

    Returns:
        Mock describe stacks['Stacks'] list item.

    """
    return {
        "StackName": stack_name,
        "StackId": stack_name,
        "CreationTime": creation_time or datetime(2015, 1, 1),
        "StackStatus": stack_status,
        "Tags": [],
        "EnableTerminationProtection": False,
        "Outputs": [
            {"OutputKey": k, "OutputValue": v, "Description": "test output"}
            for k, v in outputs.items()
        ],
    }