# Full-featured example showcasing most demonator features
#
# Run with: demonator -c examples/full-featured.yml

speed: 22
jitter: 35
pause: 150
clear: true
highlight: true

setup:
  - "mkdir -p /tmp/demonator-demo"

teardown:
  - "rm -rf /tmp/demonator-demo"

chapters:
  - name: "Introduction"
    steps:
      - comment: "Welcome to the demonator full-feature demo!"
        style: bold
      - comment: "This demo showcases commentary, highlighting, chapters, and more."
      - pause

  - name: "Basic Commands"
    steps:
      - comment: "Let's start with some basic commands."
        style: cyan
      - text: "echo 'Hello from demonator!'"
      - text: "date '+%Y-%m-%d %H:%M:%S'"
      - text: "ls -la /tmp/demonator-demo"

  - name: "Fake Output"
    steps:
      - comment: "Sometimes you need to fake command output for a demo."
      - text: "curl -s https://api.example.com/v2/status"
        fake_output: |
          {
            "status": "operational",
            "version": "2.4.1",
            "uptime": "45d 12h 33m",
            "services": {
              "api": "healthy",
              "database": "healthy",
              "cache": "healthy"
            }
          }
        output_speed: 50
        execute: false

  - name: "Conditionals"
    steps:
      - comment: "Conditional steps adapt the demo to the environment."
      - text: "which git"
        capture:
          name: has_git
          pattern: "(.*)"
      - text: "git --version"
        if: has_git
      - text: "echo 'git is not installed'"
        unless: has_git

  - name: "Wrap Up"
    steps:
      - comment: "That's the tour! Navigate chapters with n/p or jump with 1-5."
        style: green
      - text: "echo 'Demo complete!'"
