{#if loading}

Publish preview

Loading…

{:else if loadError}

Publish preview

{:else}

Publish preview

Confirm what’s about to publish to WooCommerce as a draft.

{#if preview && (st.phase === 'idle' || st.phase === 'working')} {:else if slab && st.phase !== 'idle' && st.phase !== 'working'}

SKU {slab.sku || '—'} · {slab.bdft != null ? slab.bdft.toFixed(1) : '—'} bdft · {slab.price != null ? `$${slab.price.toFixed(2)}` : '—'}

{/if} {#if st.phase === 'idle'}
{:else if st.phase === 'working'} {/if} {#if st.phase === 'success'}
Published{st.ok?.draft ? ' (UAT draft)' : ''} → Woo product #{st.ok?.wooProductId}

Photos purged · device draft cleared.

{:else if st.phase === 'failure' && st.fail} {#if st.fail.duplicateSku}
✕

SKU already exists

“{slab?.sku}” is already in the store.

{:else if st.fail.code === 'unpublishable'}
✕

Not ready to publish

Some fields are missing. Go back and finish Review.

{:else}
{st.fail.partialMedia ? '⚠' : '↻'}

{st.fail.message}

{#if st.fail.recoverable}recoverable{/if} {#if st.fail.partialMedia}orphan media — remove manually{/if} {#if !st.fail.recoverable}check Settings{/if}
{/if} {/if}
{/if}