<.button_dropdown text="Actions" class="justify-center w-full sm:w-50">
  <:option>
    <span x-data="{ copied: false }" x-on:click={~s"
        copyWithCallbacks(
          `#{Jason.Formatter.pretty_print(Phoenix.json_library().encode!(@media_profile))}`, 
          () => copied = true, 
          () => copied = false
        )
      "}>
      Copy JSON
      <span x-show="copied" x-transition.duration.150ms><.icon name="hero-check" class="ml-2 h-4 w-4" /></span>
    </span>
  </:option>
  <:option>
    <div class="h-px w-full bg-bodydark2"></div>
  </:option>
  <:option>
    <.link
      href={~p"/media_profiles/#{@media_profile}"}
      method="delete"
      data-confirm="Are you sure you want to delete this profile and all its sources (leaving files in place)? This cannot be undone."
    >
      Delete Profile
    </.link>
  </:option>
  <:option>
    <.link
      href={~p"/media_profiles/#{@media_profile}?delete_files=true"}
      method="delete"
      data-confirm="Are you sure you want to delete this profile, all its sources, and its files on disk? This cannot be undone."
      class="mt-5 md:mt-0"
    >
      Delete Profile + Files
    </.link>
  </:option>
</.button_dropdown>
