{coin ? `${coin.name} (${coin.symbol})` : 'Loading...'} - Rugplay {#if coin} {/if}
{#if loading} {:else if !coin}
Coin not found
{:else}

{coin.name}

*{coin.symbol} {#if !coin.isListed} Delisted {/if}

${formatPrice(coin.currentPrice)}

{#if coin.change24h >= 0} {:else} {/if} = 0 ? 'success' : 'destructive'}> {coin.change24h >= 0 ? '+' : ''}{Number(coin.change24h).toFixed(2)}%
{#if coin.creatorName}
Created by goto(`/user/${coin.creatorUsername}`)} > {coin.creatorName.charAt(0)} {coin.creatorName} (@{coin.creatorUsername})
{/if}
Price Chart ({selectedTimeframe})
{#each ['1m', '5m', '15m', '1h', '4h', '1d'] as timeframe} {/each}
{#if chartData.length === 0}

No trading data available yet

{:else}
{/if}
Trade {coin.symbol} {#if userHolding > 0}

You own: {formatSupply(userHolding)} {coin.symbol}

{/if}
{#if $USER_DATA}
{:else}

Sign in to start trading

{/if}
Liquidity Pool

Pool Composition

{coin.symbol}: {formatSupply(coin.poolCoinAmount)}
Base Currency: ${Number(coin.poolBaseCurrencyAmount).toLocaleString()}

Pool Stats

Total Liquidity: ${(Number(coin.poolBaseCurrencyAmount) * 2).toLocaleString()}
Current Price: ${formatPrice(coin.currentPrice)}
Market Cap

{formatMarketCap(coin.marketCap)}

24h Volume

{formatMarketCap(coin.volume24h)}

Circulating Supply

{formatSupply(coin.circulatingSupply)}

of {formatSupply(coin.initialSupply)} total

24h Change
{#if coin.change24h >= 0} {:else} {/if} = 0 ? 'success' : 'destructive'} class="text-sm"> {coin.change24h >= 0 ? '+' : ''}{Number(coin.change24h).toFixed(2)}%
{/if}