<template>
  <div class="app-card">
    <p class="app-card__title">
      {{ title }}
    </p>

    <img :src="img" alt="TeamSpeak" class="app-card__image">

    <AppButton class="app-card__action" :href="href">
      {{ action }}
    </AppButton>
  </div>
</template>

<script lang="ts" setup>
defineOptions({
  name: 'AppCard',
})

defineProps<{
  title: string
  action: string
  href: string
  img: string
}>()
</script>

<style lang="scss">
.app-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  justify-items: flex-start;
  border-radius: 16px;
  padding: 16px;
  gap: 16px;
  background-image: linear-gradient(135deg, var(--chocolate-cosmos), var(--black));

  &__title {
    font-size: 24px;
    font-weight: 700;
  }

  &__image {
    width: 80px;
    grid-row: span 2;
    opacity: 0.7;
  }

  &__action {
    grid-row: 2;
  }
}
</style>
