{@artist.name} <.country_flag country={@country} />

<.dropdown id={"actions-#{@artist.musicbrainz_id}"} placement="bottom-end"> <:toggle> <.button variant="ghost"> {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-#{@artist.musicbrainz_id}-focus-wrap"}> <.dropdown_link id={"actions-#{@artist.musicbrainz_id}-edit"} patch={~p"/artists/#{@artist.musicbrainz_id}/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-#{@artist.musicbrainz_id}-refresh-image"} phx-click={JS.push("refresh_artist_image", value: %{id: @artist.musicbrainz_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 image")} <.dropdown_link id={"actions-#{@artist.musicbrainz_id}-refresh-artist-info"} phx-click={JS.push("refresh_artist_info", value: %{id: @artist.musicbrainz_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 info")}
<.async_result :let={lastfm_artist_info} assign={@lastfm_artist_info}> <:loading> {gettext("Loading play count")} <.loading /> <:failed :let={_failure}>
<.icon name="hero-exclamation-triangle" class="-mt-1 mr-1 ml-2 h-5 w-5" aria-hidden="true" data-slot="icon" /> {gettext("Error loading play count")}
<.on_tour_link lastfm_artist_info={lastfm_artist_info} /> <.play_count play_count={lastfm_artist_info.play_count} /> <.button variant="solid" patch={~p"/artists/#{@artist.musicbrainz_id}/import"}> <.icon name="hero-plus" class="icon" aria-hidden="true" data-slot="icon" /> {gettext("Add more")}

{gettext("Meta")}

<.artist_image class="w-full rounded-md shadow-sm mt-4" artist={@artist} image_hash={@artist_info.image_data_hash} />
{gettext("MusicBrainz ID")}
{@artist.musicbrainz_id}
<.async_result :let={lastfm_artist_info} assign={@lastfm_artist_info}> <:loading>
{gettext("Loading biography")}
<:failed :let={_failure}>
<.icon name="hero-exclamation-triangle" class="-mt-1 mr-1 h-5 w-5" aria-hidden="true" data-slot="icon" /> {gettext("Error loading biography")}
{gettext("Biography")}
{remove_read_more_link(lastfm_artist_info.summary)} <.link class="block mt-2 text-sm font-medium text-zinc-900 dark:text-zinc-400" phx-click={Fluxon.open_dialog("bio")} > <.icon name="hero-arrow-right-end-on-rectangle" class="-mt-1 mr-1 h-5 w-5" aria-hidden="true" data-slot="icon" /> {gettext("Read more")}
<.sheet id="bio" class="max-w-2xl text-zinc-700 dark:text-zinc-300" placement="left"> {render_bio(lastfm_artist_info.bio)} <.external_links external_links={@external_links} />
<.record_grid :if={@collection_records_count > 0} title={gettext("Collection")} id="collection" records={@streams.collection_records} records_count={@collection_records_count} record_show_path={fn record -> ~p"/collection/#{record}" end} record_edit_path={fn record -> ~p"/collection/#{record}/show/edit" end} /> <.separator :if={@wishlist_records_count > 0} class="mt-8 mb-8" /> <.record_grid :if={@wishlist_records_count > 0} title={gettext("Wishlist")} id="wishlist" records={@streams.wishlist_records} records_count={@wishlist_records_count} record_show_path={fn record -> ~p"/wishlist/#{record}" end} record_edit_path={fn record -> ~p"/wishlist/#{record}/show/edit" end} /> <.async_result :let={similar_artists} assign={@similar_artists}> <:loading>
{gettext("Loading similar artists")}
<:failed :let={_failure}>
<.icon name="hero-exclamation-triangle" class="-mt-1 mr-1 h-5 w-5" aria-hidden="true" data-slot="icon" /> {gettext("Error loading similar artists")}
<.separator class="mt-8 mb-8" /> <.artist_grid title={gettext("Similar artists")} artists={similar_artists} />
<.json_viewer :if={@artist_info.musicbrainz_data} title={gettext("MusicBrainz data")} data={@artist_info.musicbrainz_data} /> <.json_viewer :if={@artist_info.discogs_data} title={gettext("Discogs data")} data={@artist_info.discogs_data} />
<.structured_modal :if={@live_action == :import} id="record-modal" on_close={JS.patch(~p"/artists/#{@artist.musicbrainz_id}")} > <.live_component module={MusicLibraryWeb.Components.AddRecord} id={:search} title={@page_title} action={@live_action} patch={~p"/artists/#{@artist.musicbrainz_id}"} initial_query={"arid:#{@artist.musicbrainz_id}"} icon_name="hero-plus" /> <.live_component id="artist-notes" sheet_id="artist-notes-sheet" module={MusicLibraryWeb.Components.Notes} entity={:artist} musicbrainz_id={@artist.musicbrainz_id} /> <.structured_modal :if={@live_action == :edit} id="artist-info-modal" on_close={JS.patch(~p"/artists/#{@artist.musicbrainz_id}")} > <.live_component module={MusicLibraryWeb.ArtistLive.Form} id={@artist_info.id} action={@live_action} artist_info={@artist_info} artist={@artist} patch={~p"/artists/#{@artist.musicbrainz_id}"} />