<script setup lang="ts">
import MediaLink from "@/components/mediaLibrary/MediaLink.vue";

interface Props {
  title: string;
  description?: string;
  linkText: string;
  url: string;
  icon?: string;
  openWindow?: boolean;
}

withDefaults(defineProps<Props>(), {
  icon: "",
  description: "",
  openWindow: false,
});
</script>

<template>
  <div class="flex flex-col items-center border p-4 lg:flex-row">
    <img class="mr-6" :src="icon" alt="" />
    <div>
      <h4 class="text-bold mb-2">{{ title }}</h4>
      <p class="mb-2">{{ description }}</p>
      <MediaLink :to="url" :blank="openWindow" class="link">
        <span class="inline">{{ linkText }}</span>
      </MediaLink>
    </div>
  </div>
</template>

<style lang="scss" scoped></style>
