Фільтри
{#each Object.entries(features) as [key, data]}
toggleFeature(key)} class="w-6 h-6 rounded flex items-center justify-center border transition-colors {data.enabled ? 'bg-black border-black text-white' : 'bg-gray-100 border-gray-300 text-transparent'}" >
{config[key].label}
{data.enabled ? (data.value * 100).toFixed(0) + '%' : 'OFF'}
updateValue(key, e)} class="w-full accent-black disabled:cursor-not-allowed" />
{/each}
dispatch('generate')} class="w-full bg-black text-white py-4 rounded-full font-bold text-lg shadow-lg active:scale-95 transition-transform flex items-center justify-center gap-2 hover:bg-gray-900" >
Знайти свої вайб-треки
Результати
Знайдено {tracks.length} треків
dispatch('back')} class="w-10 h-10 rounded-full border border-gray-200 flex items-center justify-center hover:bg-gray-50 transition-colors" >
{#each tracks as track, i}
dispatch('play', { track, index: i })} class="w-full flex items-center gap-4 p-3 bg-white hover:bg-gray-50 rounded-xl transition-all border border-transparent hover:border-gray-200 group text-left" >
{track.name}
{track.artist}
{/each}
dispatch('next')} on:pause={() => { if(isPlaying) dispatch('pause'); }} on:play={() => { if(!isPlaying) dispatch('resume'); }} >
dispatch('close')} class="w-10 h-10 rounded-full bg-white/50 backdrop-blur shadow-sm flex items-center justify-center text-gray-700 hover:bg-white transition-colors">
Зараз Грає
{track.name}
{track.artist}
{ const rect = e.currentTarget.getBoundingClientRect(); const p = (e.clientX - rect.left) / rect.width; currentTime = p * duration; }}>
{formatTime(currentTime)}
{formatTime(duration)}
dispatch('prev')} class="text-gray-400 hover:text-black transition-colors transform active:scale-95" >
{#if isPlaying}
{:else}
{/if}
dispatch('next')} class="text-gray-400 hover:text-black transition-colors transform active:scale-95" >
{#if view === 'input'}
{:else if view === 'list'}
view = 'input'} on:play={handlePlay} /> {/if} {#if view === 'player'}
{ view = 'list'; isPlaying = false; }} on:pause={() => isPlaying = false} on:resume={() => isPlaying = true} on:next={nextTrack} on:prev={prevTrack} /> {/if}