<script>
  import { _ } from "svelte-i18n";

  export let detailsLink;
  export let detailsAction;
  export let deleteEnabled;
  export let deleteAction;
</script>

{#if detailsLink}
  <a href={detailsLink} class="text-indigo-600 hover:text-indigo-900"
    >{$_("details")}</a
  >
{:else if detailsAction}
  <button on:click={detailsAction} class="text-indigo-600 hover:text-indigo-900"
    >{$_("details")}</button
  >
{/if}
{#if deleteEnabled}
  <button
    tabindex="0"
    on:click={deleteAction}
    class="ml-4 text-red-600 hover:text-red-900 cursor-pointer"
    >{$_("delete")}</button
  >
{/if}
