<script lang="ts">
  import type { AppContent } from '$lib/types/content';

  export let app: AppContent;
  export let openApp: (id: string) => void;
</script>

<button
  class="app-icon"
  type="button"
  aria-label={`Open ${app.shortTitle}`}
  title={app.summary}
  on:click={() => openApp(app.id)}
  on:dblclick={() => openApp(app.id)}
>
  <span class="app-icon__glyph" aria-hidden="true">{app.icon}</span>
  <span class="app-icon__label">{app.shortTitle}</span>
</button>
