<template>
  <div class="directories_containter">
    <div
      class="directory_container"
      v-for="(directory, index) in directories"
      :key="index"
      @click="view_link(directory)"
    >
      <p
        class="directory_title_txt"
        v-tooltip
        :title="directory.summary_text"
        delay='{"show":"500", "hide":"100"}'
      >
        <u>{{ directory.title_text }}</u>
      </p>
    </div>
  </div>
</template>
<script>
import { ContentApi } from '../../utils/index'
export default {
  name: 'Career',
  components: {},
  computed: {},
  mounted() {
    this.retrieve_directories()
  },
  methods: {
    retrieve_directories() {
      ContentApi.retrieve_career_directories()
        .then((response) => {
          this.directories = response.data
        })
        .catch((error) => {
          this.mnx_backendErrorHandler(error)
        })
    },
    view_link(directory) {
      this.mnx_navToLinkContentViewer(btoa(directory.content_link))
    }
  },
  data() {
    return {
      directories: null
    }
  }
}
</script>
<style scoped lang="scss">
.directories_containter {
  @extend .container;
}

.directory_container {
  @extend .container;
  cursor: pointer;
}

.directory_title_txt {
}
</style>
