<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;
}

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

<template>
  <div class="border flex flex-col lg:flex-row p-4 items-center">
    <img class="mr-6" :src="icon" alt="" />
    <div>
      <h4 class="mb-2 text-bold">{{ 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>
