{{#let (hash data=data error=error persist=(action "persist") delete=(queue (action (mut data)) (action dispatch "REMOVE")) inflight=(state-matches state (array "persisting" "removing")) disabled=(state-matches state (array "persisting" "removing")) ) as |api|}} {{yield api}} {{#let (queue (action dispatch "RESET") (action ondelete)) as |after|}} {{#yield-slot name="removed" params=(block-params after)}} {{yield api}} {{else}} Success!

Your {{or label type}} has been deleted.

{{/yield-slot}} {{/let}}
{{#let (action onchange) as |after|}} {{#yield-slot name="persisted" params=(block-params after)}} {{yield api}} {{else}} Success!

Your {{or label type}} has been saved.

{{/yield-slot}} {{/let}}
{{#let (action dispatch "RESET") as |after|}} {{#yield-slot name="error" params=(block-params after api.error)}} {{yield api}} {{else}} Error!

There was an error saving your {{or label type}}. {{#if (and api.error.status api.error.detail)}}
{{api.error.status}}: {{api.error.detail}} {{/if}}

{{/yield-slot}} {{/let}}
{{yield api}} {{/let}}