#set page(width: auto, height: auto)
#import "/src/lib.typ": *

#diagram({
  _par("a", display-name: "Alice")
  _par("b", display-name: "Bob")

  // Left to right
  _seq("a", "b")
  _seq("a", "b", enable-dst: true)
  _seq("a", "b")
  _seq("a", "b", enable-dst: true)
  _seq("a", "b")
  _seq("a", "b", disable-dst: true)
  _seq("a", "b")
  _seq("a", "b", disable-dst: true)
  _seq("a", "b")
})

#pagebreak()

#diagram({
  _par("a", display-name: "Alice")
  _par("b", display-name: "Bob")

  // Right to left
  _seq("b", "a")
  _seq("b", "a", enable-dst: true)
  _seq("b", "a")
  _seq("b", "a", enable-dst: true)
  _seq("b", "a")
  _seq("b", "a", disable-dst: true)
  _seq("b", "a")
  _seq("b", "a", disable-dst: true)
  _seq("b", "a")
})

#pagebreak()

#diagram({
  _par("a", display-name: "Alice")
  _par("b", display-name: "Bob")

  // Self right
  _seq("a", "a")
  _seq("a", "a", enable-dst: true)
  _seq("a", "a")
  _seq("a", "a", enable-dst: true)
  _seq("a", "a")
  _seq("a", "a", disable-dst: true)
  _seq("a", "a")
  _seq("a", "a", disable-dst: true)
  _seq("a", "a")
})

#pagebreak()

#diagram({
  _par("a", display-name: "Alice")
  _par("b", display-name: "Bob")

  let _seq = _seq.with(flip: true)

  // Self left
  _seq("b", "b")
  _seq("b", "b", enable-dst: true)
  _seq("b", "b")
  _seq("b", "b", enable-dst: true)
  _seq("b", "b")
  _seq("b", "b", disable-dst: true)
  _seq("b", "b")
  _seq("b", "b", disable-dst: true)
  _seq("b", "b")
})

#pagebreak()

#diagram({
  _par("a", display-name: "Alice")
  _par("b", display-name: "Bob")

  // Disable src (rtl)
  _seq("a", "b")
  _seq("a", "b", enable-dst: true)
  _seq("a", "b")
  _seq("a", "b", enable-dst: true)
  _seq("a", "b")
  _seq("b", "a", disable-src: true)
  _seq("a", "b")
  _seq("b", "a", disable-src: true)
  _seq("a", "b")
})

#pagebreak()

#diagram({
  _par("a", display-name: "Alice")
  _par("b", display-name: "Bob")

  // Disable src (ltr)
  _seq("b", "a")
  _seq("b", "a", enable-dst: true)
  _seq("b", "a")
  _seq("b", "a", enable-dst: true)
  _seq("b", "a")
  _seq("a", "b", disable-src: true)
  _seq("b", "a")
  _seq("a", "b", disable-src: true)
  _seq("b", "a")
})
