<.record_cover record={@record} class="w-full rounded-lg drop-shadow-sm" />

<.artist_links joinphrase_class="text-sm" artists={@record.artists} />

<.button_group> <.button variant="soft" phx-click={MusicLibraryWeb.Components.Notes.open("record-notes-sheet")} > {gettext("Open Notes")} <.icon name="hero-pencil" class="h-5 w-5" aria-hidden="true" data-slot="icon" /> <.button :if={@record.selected_release_id} variant="soft" phx-click={MusicLibraryWeb.Components.Release.open("release-with-tracks-sheet")} > {gettext("Show Tracks")} <.icon name="hero-numbered-list" class="h-5 w-5" aria-hidden="true" data-slot="icon" /> <.dropdown id={"actions-#{@record.id}"} placement="bottom-end"> <:toggle> <.button variant="soft"> {gettext("Actions")} <.icon name="hero-ellipsis-vertical" class="h-5 w-5 text-zinc-500 dark:text-zinc-400 cursor-pointer" aria-hidden="true" data-slot="icon" /> <.focus_wrap id={"actions-#{@record.id}-focus-wrap"}> <.dropdown_link id={"actions-#{@record.id}-edit"} patch={~p"/collection/#{@record}/show/edit"} > <.icon name="hero-pencil-square" class="h-4 w-4 mr-1 phx-click-loading:animate-bounce" aria-hidden="true" data-slot="icon" /> {gettext("Edit")} <.dropdown_link id={"actions-#{@record.id}-refresh-cover"} phx-click={JS.push("refresh_cover", value: %{id: @record.id})} > <.icon name="hero-photo" class="h-4 w-4 mr-1 phx-click-loading:animate-bounce" aria-hidden="true" data-slot="icon" /> {gettext("Refresh cover")} <.dropdown_link id={"actions-#{@record.id}-refresh-mb-data"} phx-click={JS.push("refresh_musicbrainz_data", value: %{id: @record.id})} > <.icon name="hero-arrow-path" class="h-4 w-4 mr-1 phx-click-loading:animate-spin" aria-hidden="true" data-slot="icon" /> {gettext("Refresh MB data")} <.dropdown_link id={"actions-#{@record.id}-populate-genres"} phx-click={JS.push("populate_genres", value: %{id: @record.id})} > <.icon name="hero-sparkles" class="h-4 w-4 mr-1 phx-click-loading:animate-shake" aria-hidden="true" data-slot="icon" /> {gettext("Populate genres")} <.dropdown_link id={"actions-#{@record.id}-regenerate-embeddings"} phx-click={JS.push("regenerate_embeddings", value: %{id: @record.id})} > <.icon name="hero-sparkles" class="h-4 w-4 mr-1 phx-click-loading:animate-shake" aria-hidden="true" data-slot="icon" /> {gettext("Regenerate embeddings")} <.dropdown_link id={"actions-#{@record.id}-extract-colors-fast"} phx-click={JS.push("extract_colors", value: %{id: @record.id, method: :fast})} > <.icon name="hero-paint-brush" class="h-4 w-4 mr-1 phx-click-loading:animate-shake" aria-hidden="true" data-slot="icon" /> {gettext("Extract colors (fast)")} <.dropdown_link id={"actions-#{@record.id}-extract-colors-slow"} phx-click={JS.push("extract_colors", value: %{id: @record.id, method: :slow})} > <.icon name="hero-paint-brush" class="h-4 w-4 mr-1 phx-click-loading:animate-shake" aria-hidden="true" data-slot="icon" /> {gettext("Extract colors (slow)")} <.dropdown_separator /> <.dropdown_link id={"actions-#{@record.id}-delete"} phx-click={JS.push("delete", value: %{id: @record.id})} data-confirm={gettext("Are you sure?")} class="text-red-900! hover:bg-red-50! dark:text-red-500! dark:hover:bg-red-900/30! dark:hover:text-red-600!" > <.icon name="hero-trash" class="h-4 w-4 mr-1 phx-click-loading:animate-spin" aria-hidden="true" data-slot="icon" /> {gettext("Delete")}

{@record.title}

<.record_colors record={@record} /> {Records.Record.format_release_date(@record.release_date)} · {format_label( @record.format )} · {type_label(@record.type)}

<.dl_row label={gettext("ID")}>
{@record.id} <.copy_to_clipboard target_id={"record-#{@record.id}"} label={gettext("Copy record ID to clipboard")} />
<.dl_row label={gettext("Genres")}> <.link :for={genre <- @record.genres} class="mr-2 text-zinc-700 hover:text-zinc-500 dark:text-zinc-400 dark:hover:text-zinc-300" patch={~p"/collection?#{%{query: ~s(genre:"#{genre}")}}"} > {genre} <.dl_row label={gettext("MusicBrainz ID")}>
{@record.musicbrainz_id} <.copy_to_clipboard target_id={"mb-#{@record.musicbrainz_id}"} label={gettext("Copy MusicBrainz ID to clipboard")} />
<.dl_row label={gettext("Purchased on")}> {Records.Record.format_as_date(@record.purchased_at)} <.dl_row label={gettext("Published releases")}>
{Records.Record.release_count(@record)} <.release_list record={@record} />
<.dl_row label={gettext("Collected release")}>
{gettext("No release selected")} <.release_summary :if={@record.selected_release_id} release={Records.Record.selected_release(@record)} /> @record.id} class="hidden" > {@record.selected_release_id} <.copy_to_clipboard :if={@record.selected_release_id} target_id={"record-selected-release-" <> @record.id} label={gettext("Copy record selected release ID to clipboard")} />
<.dl_row :if={Records.Record.included_release_groups_count(@record) > 0} label={gettext("Includes")} >
  • {included_release_group.artists} - {included_release_group.title}
<.dl_row label={gettext("Inserted at")}> {Records.Record.format_as_date(@record.inserted_at)} <.dl_row label={gettext("Updated at")}> {Records.Record.format_as_date(@record.updated_at)} <.dl_row label={gettext("Last listened at")}> {localize_scrobbled_at(@last_listened_track.scrobbled_at_uts, @timezone)} {gettext("Never")} 0}> {ngettext("(1 scrobble)", "(%{count} scrobbles)", @play_count)}
<.similar_records similar_records={@similar_records} record_show_path={fn record -> ~p"/collection/#{record}" end} section={:collection} /> <.json_viewer title={gettext("MusicBrainz data")} data={@record.musicbrainz_data} /> <.text_viewer title={gettext("Record Embedding")} data={@embedding_text} /> <.live_component id="release-with-tracks" sheet_id="release-with-tracks-sheet" module={MusicLibraryWeb.Components.Release} record={@record} /> <.live_component id="record-notes" sheet_id="record-notes-sheet" module={MusicLibraryWeb.Components.Notes} entity={:record} musicbrainz_id={@record.musicbrainz_id} /> <.structured_modal :if={@live_action == :edit} id="record-modal" on_close={JS.patch(~p"/collection/#{@record}")} > <.live_component module={MusicLibraryWeb.Components.RecordForm} id={@record.id} action={@live_action} show_purchased_at={true} record={@record} patch={~p"/collection/#{@record}"} />