<template>
  <div>
    <div
      v-if="description"
      class="mt-2 flex flex-col sm:flex-row sm:flex-wrap sm:space-x-6"
    >
      <div class="flex items-center text-sm text-gray-500">
        {{ description }}
      </div>
    </div>
    <div
      class="mt-1 flex flex-col sm:mt-0 sm:flex-row sm:flex-wrap sm:space-x-6"
    >
      <div
      v-if="helpArticle"
        :class="['mt-2 flex items-center text-sm text-indigo-600', helpArticleClass]"
      >
        <c-icon
        v-if="helpArticleIcon"
        :class="helpArticleIcon.class"
        :name="helpArticleIcon.name"
        :type="helpArticleIcon.type"
        :viewBox="helpArticleIcon.viewBox"
        ></c-icon>
        <a
          :href="helpArticle"
          target="_blank"
          class="font-medium text-indigo-600 hover:underline"
        >
          {{ articleTitle }}
        </a>
      </div>
      <div
        class="mt-2 flex items-center text-sm text-indigo-600"
        v-if="helpVideo"
      >
        <c-icon
          class="mr-1.5 h-5 w-5"
          name="video-camera"
          type="solid"
        ></c-icon>
        <a
          :href="helpVideo"
          target="_blank"
          class="font-medium text-indigo-600 hover:underline"
        >
          {{ videoTitle }}
        </a>
      </div>
    </div>
  </div>
</template>

<script>
import CIcon from "../CIcon/CIcon.vue";
export default {
  name: "CModuleHelpLinks",
  components: { CIcon },
  props: {
    description: { type: String },
    helpVideo: {
      type: String,
    },
    helpArticle: { type: String },
    articleTitle: {
      type: String,
      default: "How to get started",
    },
    videoTitle: {
      type: String,
      default: "Watch a video",
    },
    helpArticleClass: {
      type: String,
    },
    helpArticleIcon: {
      type: Object,
      default: () => ({
        name: "book-open",
        type: "solid",
        class: "mr-1.5 h-5 w-5",
        viewBox: "0 0 20 20",
      }),
    },
  },
  methods: {},
};
</script>
