{{#if this.handleAsyncStateOnly}} {{#if @task.isRunning}}
{{else}} {{yield}} {{/if}} {{else}} {{#if @task.last.isError}} {{#let (or @errorHeading "An error occurred. Please try again shortly.") as |errorMessage|}} {{! Show entity lockup if toggled on, otherwise yield error. This allows this component to be used in interfaces where rendering the lockup is not suitable, for example in a button }} {{#if this.showLockup}}
{{else}} {{! If the callee requires more flexibility, a custom component to handle rendering the error can be provided and will take precedence over the basic message rendering }} {{#if @customErrorComponent}} {{component @customErrorComponent error=@task.last.error message=@errorHeading}} {{else}} {{errorMessage}} {{/if}} {{/if}} {{/let}} {{else}} {{#if @task.isRunning}}
{{else}} {{yield}} {{/if}} {{/if}} {{/if}}