<.header>
  Item <%= @item.id %>
  <:subtitle>This is a item record from your database.</:subtitle>
  <:actions>
    <.link patch={~p"/items/#{@item}/show/edit"} phx-click={JS.push_focus()}>
      <.button>Edit item</.button>
    </.link>
  </:actions>
</.header>

<.list>
  <:item title="Title"><%= @item.title %></:item>
  <:item title="Description"><%= @item.description %></:item>
  <:item title="Url"><%= @item.url %></:item>
  <:item title="Desire"><%= @item.desire %></:item>
</.list>

<.back navigate={~p"/items"}>Back to items</.back>

<.modal :if={@live_action == :edit} id="item-modal" show on_cancel={JS.patch(~p"/items/#{@item}")}>
  <.live_component
    module={WishWeb.ItemLive.FormComponent}
    id={@item.id}
    title={@page_title}
    action={@live_action}
    item={@item}
    patch={~p"/items/#{@item}"}
  />
</.modal>
