@startuml
!include style.puml

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":DeleteCommandParser" as DeleteCommandParser LOGIC_COLOR
participant "d:DeleteCommand" as DeleteCommand LOGIC_COLOR
participant ":CommandResult" as CommandResult LOGIC_COLOR
end box

box Model MODEL_COLOR_T1
participant ":Model" as Model MODEL_COLOR
end box

[-> LogicManager : execute("delete 1")
activate LogicManager

LogicManager -> AddressBookParser : parseCommand("delete 1")
activate AddressBookParser

create DeleteCommandParser
AddressBookParser -> DeleteCommandParser
activate DeleteCommandParser

DeleteCommandParser --> AddressBookParser
deactivate DeleteCommandParser

AddressBookParser -> DeleteCommandParser : parse("1")
activate DeleteCommandParser

create DeleteCommand
DeleteCommandParser -> DeleteCommand
activate DeleteCommand

DeleteCommand --> DeleteCommandParser : d
deactivate DeleteCommand

DeleteCommandParser --> AddressBookParser : d
deactivate DeleteCommandParser
'Hidden arrow to position the destroy marker below the end of the activation bar.
DeleteCommandParser -[hidden]-> AddressBookParser
destroy DeleteCommandParser

AddressBookParser --> LogicManager : d
deactivate AddressBookParser

LogicManager -> DeleteCommand : execute()
activate DeleteCommand

DeleteCommand -> Model : deletePerson(1)
activate Model

Model --> DeleteCommand
deactivate Model

create CommandResult
DeleteCommand -> CommandResult
activate CommandResult

CommandResult --> DeleteCommand
deactivate CommandResult

DeleteCommand --> LogicManager : result
deactivate DeleteCommand

[<--LogicManager
deactivate LogicManager
@enduml
