#!/usr/bin/env python3
# SPDX-License-Identifier: MIT
"""Offline Year 9 toy AND-rule lab using fictional booleans only."""

from __future__ import annotations

import argparse


def gate(readable: bool, reviewed: bool) -> str:
    """Return a mock status; never use this to approve a real label or person."""
    return "READY" if readable and reviewed else "RECHECK"


def table() -> str:
    rows = ["readable reviewed status"]
    for readable in (False, True):
        for reviewed in (False, True):
            rows.append(f"{readable!s:<8} {reviewed!s:<8} {gate(readable, reviewed)}")
    return "\n".join(rows)


def read_bool(name: str) -> bool:
    while True:
        raw = input(f"Fictional {name} (yes/no): ").strip().lower()
        if raw in {"yes", "y"}:
            return True
        if raw in {"no", "n"}:
            return False
        print("Type yes or no only; no personal information is needed.")


def main() -> None:
    parser = argparse.ArgumentParser(description="Offline fictional AND-rule table")
    parser.add_argument("--interactive", action="store_true", help="try one fictional yes/no pair")
    args = parser.parse_args()
    print("TOY MODEL ONLY: no real access, label or safety decision.")
    print(table())
    if args.interactive:
        print(f"Your fictional case: {gate(read_bool('readable'), read_bool('reviewed'))}")


if __name__ == "__main__":
    main()
