{{yield}} {{did-update (fn dispatch "LOAD") src=src}} {{#let (hash data=data error=error dispatchError=(queue (action (mut error) value="error.errors.firstObject") (action dispatch "ERROR")) ) as |api|}} {{#yield-slot name="data"}} {{yield api}} {{else}} {{! if we didn't specify any data}} {{#if (not items)}} {{! try and load the data if we aren't in an error state}} {{! but only if we only asked for a single load and we are in loading state}} {{#if (and src (or (not once) (state-matches state "loading")))}} {{/if}} {{/if}} {{/yield-slot}} {{#yield-slot name="loading"}} {{yield api}} {{else}} {{/yield-slot}} {{#yield-slot name="error"}} {{yield api}} {{else}} {{/yield-slot}} {{#yield-slot name="disconnected" params=(block-params (component 'notification' after=(action dispatch "RESET")))}} {{yield api}} {{else}} {{/yield-slot}} {{yield api}} {{/let}}