@startuml
!pragma layout smetana
set separator none
hide empty description
hide stereotype
skinparam state {
  BackgroundColor white
  BorderColor #94a3b8
  BorderThickness 1
  FontName Inter
  FontSize 9
  FontStyle bold
  RoundCorner 20
  Padding 1
}
skinparam shadowing false
skinparam ArrowFontName JetBrains Mono
skinparam ArrowFontSize 8
skinparam ArrowColor #cbd5e1
skinparam ArrowThickness 1
skinparam dpi 110
skinparam svgLinkTarget _self

[*] --> String.NEW

state String.CHECK_AVAILABILITY <<choice>>

String.NEW -[#1E90FF,bold]-> String.CHECK_AVAILABILITY <<external>> : String.PLACE_ORDER
String.CHECK_AVAILABILITY -[#FF6347,bold]-> String.PENDING_PAYMENT <<choice_type>> : [λ] (order=0)
String.CHECK_AVAILABILITY -[#FF6347,bold]-> String.CANCELLED <<choice_type>> : (order=1)
String.PENDING_PAYMENT -[#1E90FF,bold]-> String.PAID <<external>> : String.PAY_ORDER
String.PAID -[#1E90FF,bold]-> String.SHIPPED <<external>> : String.SHIP_ORDER
String.SHIPPED -[#1E90FF,bold]-> String.DELIVERED <<external>> : String.FINALIZE
String.PAID -[#1E90FF,bold]-> String.CANCELLED <<external>> : String.CANCEL_ORDER
String.DELIVERED -[#1E90FF,bold]-> String.RETURNED <<external>> : String.RETURN_ORDER

String.CANCELLED --> [*]
String.RETURNED --> [*]
String.DELIVERED --> [*]
@enduml

