<commit_before><template>
  <!--
  =====================================================================================
    DAPP WRAPPER:
  =====================================================================================
  -->
  <mew6-white-sheet class="core--components--the-wrapper-dapp">
    <!--
    =====================================================================================
      Mew Banner - props: bannerText, bannerImg
      TODO: we currently do not have all the custom dapp banner images, so will use the default for
      now if there is none available.
    =====================================================================================
    -->
    <mew-banner
      v-if="false"
      :text-obj="bannerTextObj"
      :banner-img="bannerImg"
      @closeBanner="onClose"
    />

    <block-header
      :text-obj="bannerTextObj"
      :banner-img="bannerImg"
      :title-icon="titleIcon"
      :no-back-btn="noBackBtn"
      :top-strip="topStrip"
      @closeBanner="onClose"
    >
      <template #body>
        <slot name="HeaderBody" />
      </template>
      <template #right>
        <slot name="HeaderRight" />
      </template>
    </block-header>

    <!--
    =====================================================================================
      Mew Tabs - props: tabItems, activeTab; takes in a slot for each 
      tab content (tabContent + tab number )
    =====================================================================================
    -->
    <mew-tabs
      v-if="tabItems.length > 0"
      class="pt-5"
      :items="tabItems"
      :is-centered="true"
      :active-tab="activeTab"
      has-underline
      @onTab="onTab"
    >
      <template
        v-for="(item, idx) in tabItems"
        :slot="'tabContent' + (idx + 1)"
      >
        <slot :name="'tabContent' + (idx + 1)" />
      </template>
    </mew-tabs>

    <!--
    =====================================================================================
     Slot: content, used to place body content if not using tabs.
    =====================================================================================
    -->
    <div v-if="tabItems.length === 0" class="pt-8 px-3 pa-md-8">
      <slot name="content" />
    </div>
  </mew6-white-sheet>
</template>

<script>
import bannerImage from '@/assets/images/backgrounds/bg-dapps-center.png';
import BlockHeader from '@/core/components/AppBlockHeader';

export default {
  components: { BlockHeader },
  props: {
    hasExitBtn: {
      default: false,
      type: Boolean
    },
    bannerImg: {
      default: bannerImage,
      type: String
    },
    bannerText: {
      default: () => {},
      type: Object
    },
    tabItems: {
      default: () => [],
      type: Array
    },
    activeTab: {
      default: 0,
      type: Number
    },
    onTab: {
      default: () => {},
      type: Function
    }
  },
  data() {
    return {
      bannerTextObj: {}
    };
  },
  mounted() {
    this.bannerTextObj = this.bannerText;
    if (this.hasExitBtn) {
      this.bannerTextObj.exit = this.$t('common.exit-dapp');
    }
  },
  methods: {
    onClose() {
      this.$router.push({
        name: 'Dapps'
      });
    }
  }
};
</script>

<style lang="scss">
.core--components--the-wrapper-dapp {
  .v-tabs {
    display: none;
  }
}
</style><commit_msg>devop: latest<commit_after><template>
  <!--
    =====================================================================================
      DAPP WRAPPER:
    =====================================================================================
    -->
  <mew6-white-sheet>
    <!--
    =====================================================================================
      Mew Banner - props: bannerText, bannerImg
      TODO: we currently do not have all the custom dapp banner images, so will use the default for
      now if there is none available.
    =====================================================================================
    -->
    <mew-banner
      :text-obj="bannerTextObj"
      :banner-img="bannerImg"
      @closeBanner="onClose"
    />
    <!--
    =====================================================================================
      Mew Tabs - props: tabItems, activeTab; takes in a slot for each 
      tab content (tabContent + tab number )
    =====================================================================================
    -->
    <mew-tabs
      v-if="tabItems.length > 0"
      class="pt-5"
      :items="tabItems"
      :is-centered="true"
      :active-tab="activeTab"
      has-underline
      @onTab="onTab"
    >
      <template
        v-for="(item, idx) in tabItems"
        :slot="'tabContent' + (idx + 1)"
      >
        <slot :name="'tabContent' + (idx + 1)" />
      </template>
    </mew-tabs>
    <!--
    =====================================================================================
     Slot: content, used to place body content if not using tabs.
    =====================================================================================
    -->
    <div v-if="tabItems.length === 0" class="pt-8 px-3 pa-md-8">
      <slot name="content" />
    </div>
  </mew6-white-sheet>
</template>

<script>
import bannerImage from '@/assets/images/backgrounds/bg-dapps-center.png';

export default {
  props: {
    hasExitBtn: {
      default: false,
      type: Boolean
    },
    bannerImg: {
      default: bannerImage,
      type: String
    },
    bannerText: {
      default: () => {},
      type: Object
    },
    tabItems: {
      default: () => [],
      type: Array
    },
    activeTab: {
      default: 0,
      type: Number
    },
    onTab: {
      default: () => {},
      type: Function
    }
  },
  data() {
    return {
      bannerTextObj: {}
    };
  },
  mounted() {
    this.bannerTextObj = this.bannerText;
    if (this.hasExitBtn) {
      this.bannerTextObj.exit = this.$t('common.exit-dapp');
    }
  },
  methods: {
    onClose() {
      this.$router.push({
        name: 'Dapps'
      });
    }
  }
};
</script>
{'fraction_non_alphanumeric': 0.3464397819263175, 'fraction_numerical': 0.0036345613745250287, 'mean_word_length': 2.6982284667073917, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 59, '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': '7234426', 'n_tokens_mistral': 1756, 'n_tokens_neox': 1645, 'n_words': 331}