<commit_before><template>

  <a v-on:click="fetchFullContent(pk)" :href="linkhref">
    <div class="content-card-container">
      <div class="content-icon">
        <img :src="icon">
      </div>
      <img :src="thumbsrc" class="thumbnail">
      <div class="title">
        {{ title }}
      </div>
    </div>
  </a>

</template>


<script>

  module.exports = {
    props: [
      'title',
      'thumbsrc',
      'linkhref',
      'kind',
      'progress',
      'pk',
    ],
    computed: {
      icon() {
        // Note: dynamic requires should be used carefully because
        //  they greedily add items to the webpack bundle.
        // See https://webpack.github.io/docs/context.html
        return require(`./content-icons/${this.progress}-${this.kind}.svg`);
      },
    },
    vuex: {
      actions: require('../../actions'),
    },
  };

</script>


<style lang="stylus" scoped>

  @require '~core-theme.styl'

  .content-card-container
    width: 210px
    height: 11rem
    background-color: $core-bg-light
    border-radius: 4px
    position: relative

  .content-icon<commit_msg>adding prop validation for content-card<commit_after><template>

  <a v-on:click="fetchFullContent(pk)" :href="linkhref">
    <div class="content-card-container">
      <div class="content-icon">
        <img :src="icon">
      </div>
      <img :src="thumbsrc" class="thumbnail">
      <div class="title">
        {{ title }}
      </div>
    </div>
  </a>

</template>


<script>

  module.exports = {
    props: {
      pk: {
        type: String,
        required: true,
      },
      title: {
        type: String,
        required: true,
      },
      thumbsrc: {
        type: String,
        required: true,
      },
      linkhref: {
        type: String,
        required: true,
      },
      kind: {
        type: String,
        required: true,
        validator(value) {
          return [
            'audio',
            'video',
            'document',
            'exercise',
          ].some(elem => elem === value);
        },
      },
      progress: {
        type: String,
        required: true,
        validator(value) {
          return [
            'complete',
            'partial',
            'unstarted',
          ].some(elem => elem === value);
        },
      },
    },
    computed: {
      icon() {
        // Note: dynamic requires should be used carefully because
        //  they greedily add items to the webpack bundle.
        // See https://webpack.github.io/docs/context.html
        return require(`./content-icons/${this.progress}-${this.kind}.svg`);
      },
    },
    vuex: {
      actions: require('../../actions'),
    },
  };

</script>


<style lang="stylus" scoped>

  @require '~core-theme.styl'

  .content-card-container
    width: 210px
    height: 11rem
    background-color: $core-bg-light
    border-radius: 4px
    position: relative

  .content-icon
{'fraction_non_alphanumeric': 0.157642220699109, 'fraction_numerical': 0.00411240575736806, 'mean_word_length': 1.766824644549763, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 35, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2558433', 'n_tokens_mistral': 924, 'n_tokens_neox': 898, 'n_words': 190}