{currentMessage}
{#if battlePhase === 'main' && !processingTurn && !battleEnded}
{:else if battlePhase === 'moveSelect'}
Select a move
← Back
{#each playerPiclet.moves as move}
onMoveSelect(move)} disabled={move.currentPp <= 0} >
{move.name}
{move.type}
PP: {move.currentPp}/{move.pp}
{/each}
{:else if battlePhase === 'picletSelect'}
Select a Piclet
← Back
{#if availablePiclets.length === 0}
No other healthy Piclets available!
{:else} {#each availablePiclets as piclet}
onPicletSelect(piclet)} >
e.currentTarget.src = 'https://via.placeholder.com/50x50?text=P'} />
{piclet.nickname}
Lv.{piclet.level} - HP: {piclet.currentHp}/{piclet.maxHp}
{/each} {/if}
{:else if battleEnded}
window.history.back()}> Continue
{/if}