{#if state === STATES.ERROR} {:elseif state === STATES.LOADING} {:elseif state === STATES.SUCCESS && component} {#if hasSuccessSlot} {:else} {/if} {/if}