<commit_before><template>

  <section class="content-carousel">

    <div :style="contentControlsContainerStyles">
      <div
        v-show="!isFirstSet"
        class="content-carousel-previous-control"
        @click="previousSet"
      >
        <KIconButton
          icon="back"
          appearance="raised-button"
          class="content-carousel-control-button"
          :style="buttonTransforms"
          :disabled="isFirstSet"
          size="large"
        />
      </div>

      <transition-group
        :style="contentSetStyles"
        tag="div"
        @leave="slide"
        @before-enter="setStartPosition"
        @enter="slide"
      >

        <!-- eslint-disable vue/no-use-v-if-with-v-for -->
        <ContentCard
          v-for="(content, index) in contents"
          v-if="isInThisSet(index)"
          :key="content.id"
          class="content-carousel-card"
          :style="positionCalc(index)"
          :title="content.title"
          :thumbnail="content.thumbnail"
          :kind="content.kind"
          :isLeaf="content.is_leaf"
          :progress="content.progress"
          :numCoachContents="content.num_coach_contents"
          :link="genContentLink(content.id, content.is_leaf)"
        />
      </transition-group>

      <div
        v-show="!isLastSet"
        class="content-carousel-next-control"
        @click="nextSet"
      >
        <KIconButton
          icon="forward"
          appearance="raised-button"
          class="content-carousel-control-button"
          :style="buttonTransforms"
          :disabled="isLastSet"
          size="large"
        />
      </div>

    </div>


  </section>

</template>


<script>

  import responsiveElementMixin from 'kolibri.coreVue.mixins.responsiveElementMixin';
  import { validateLinkObject } from 'kolibri.utils.validators';
  import ContentCard from './ContentCard';

  if (!ContentCard.mixins) {
    ContentCard.mixins = [];
  }
  ContentCard.mixins.push(responsiveElementMixin); //including because carousel breaks without it

  const contentCardWidth = 210;
  const gutterWidth = 20;
  const horizontalShadowOffset = 12;

  export default {
    name: 'ContentCardGroupCarousel',
    components: {
      ContentCard,
    },
    mixins: [responsiveElementMixin],
    props: {
      contents: {<commit_msg>Don't use KResponsiveElementMixin in all ContentCards<commit_after><template>

  <section class="content-carousel">

    <div :style="contentControlsContainerStyles">
      <div
        v-show="!isFirstSet"
        class="content-carousel-previous-control"
        @click="previousSet"
      >
        <KIconButton
          icon="back"
          appearance="raised-button"
          class="content-carousel-control-button"
          :style="buttonTransforms"
          :disabled="isFirstSet"
          size="large"
        />
      </div>

      <transition-group
        :style="contentSetStyles"
        tag="div"
        @leave="slide"
        @before-enter="setStartPosition"
        @enter="slide"
      >

        <!-- eslint-disable vue/no-use-v-if-with-v-for -->
        <ContentCard
          v-for="(content, index) in contents"
          v-if="isInThisSet(index)"
          :key="content.id"
          class="content-carousel-card"
          :style="positionCalc(index)"
          :title="content.title"
          :thumbnail="content.thumbnail"
          :kind="content.kind"
          :isLeaf="content.is_leaf"
          :progress="content.progress"
          :numCoachContents="content.num_coach_contents"
          :link="genContentLink(content.id, content.is_leaf)"
        />
      </transition-group>

      <div
        v-show="!isLastSet"
        class="content-carousel-next-control"
        @click="nextSet"
      >
        <KIconButton
          icon="forward"
          appearance="raised-button"
          class="content-carousel-control-button"
          :style="buttonTransforms"
          :disabled="isLastSet"
          size="large"
        />
      </div>

    </div>


  </section>

</template>


<script>

  import responsiveElementMixin from 'kolibri.coreVue.mixins.responsiveElementMixin';
  import { validateLinkObject } from 'kolibri.utils.validators';
  import ContentCard from './ContentCard';

  const contentCardWidth = 210;
  const gutterWidth = 20;
  const horizontalShadowOffset = 12;

  export default {
    name: 'ContentCardGroupCarousel',
    components: {
      ContentCard,
    },
    mixins: [responsiveElementMixin],
    props: {
      contents: {
{'fraction_non_alphanumeric': 0.12685410670799202, 'fraction_numerical': 0.003099402258135931, 'mean_word_length': 2.243359655419957, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, 'https://': 0, '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': '2015393', 'n_tokens_mistral': 1362, 'n_tokens_neox': 1322, 'n_words': 195}