<commit_before><template>

  <CoreBase
    :appBarTitle="currentPageAppBarTitle"
    :immersivePage="currentPageIsImmersive"
    :immersivePagePrimary="true"
    :immersivePageRoute="immersivePageRoute"
    :immersivePageIcon="immersivePageIcon"
    :toolbarTitle="currentPageAppBarTitle"
    :showSubNav="canManageContent && !currentPageIsImmersive"
  >
    <DeviceTopNav slot="sub-nav" />

    <transition name="delay-entry">
      <WelcomeModal
        v-if="welcomeModalVisible"
        @submit="hideWelcomeModal"
      />
    </transition>

    <KPageContainer>
      <component :is="currentPage" />
    </KPageContainer>
  </CoreBase>

</template>


<script>

  import { mapState, mapGetters, mapActions } from 'vuex';
  import CoreBase from 'kolibri.coreVue.components.CoreBase';
  import KPageContainer from 'kolibri.coreVue.components.KPageContainer';
  import { ContentWizardPages, PageNames } from '../constants';
  import DeviceTopNav from './DeviceTopNav';
  import ManageContentPage from './ManageContentPage';
  import ManagePermissionsPage from './ManagePermissionsPage';
  import UserPermissionsPage from './UserPermissionsPage';
  import DeviceInfoPage from './DeviceInfoPage';
  import WelcomeModal from './WelcomeModal';
  import AvailableChannelsPage from './AvailableChannelsPage';
  import SelectContentPage from './SelectContentPage';
  import DeviceSettingsPage from './DeviceSettingsPage';

  const pageNameComponentMap = {
    [PageNames.MANAGE_CONTENT_PAGE]: ManageContentPage,
    [PageNames.MANAGE_PERMISSIONS_PAGE]: ManagePermissionsPage,
    [PageNames.USER_PERMISSIONS_PAGE]: UserPermissionsPage,
    [PageNames.DEVICE_INFO_PAGE]: DeviceInfoPage,
    [ContentWizardPages.AVAILABLE_CHANNELS]: AvailableChannelsPage,
    [ContentWizardPages.SELECT_CONTENT]: SelectContentPage,
    [PageNames.DEVICE_SETTINGS_PAGE]: DeviceSettingsPage,
  };

  export default {
    name: 'DeviceIndex',
    components: {
      CoreBase,
      WelcomeModal,
      DeviceTopNav,
      KPageContainer,
    },
    computed: {
      ...mapGetters(['canManageContent']),
      ...mapState(['pageName', 'welcomeModalVisible']),
      ...mapState('coreBase', ['appBarTitle']),
      ...mapGetters('coreBase', [
        'currentPageIsImmersive',
        'immersivePageIcon',
        'immersivePageRoute',
        'inContentManagementPage',
      ]),
      currentPage() {
        return pageNameComponentMap[this.pageName];
      },
      currentPageAppBarTitle() {
        if (this.pageName === PageNames.USER_PERMISSIONS_PAGE) {
          return this.$tr('permissionsLabel');
        } else {
          return this.appBarTitle || this.$tr('deviceManagementTitle');
        }
      },
    },
    watch: {
      inContentManagementPage(val) {
        return val ? this.startTaskPolling() : this.stopTaskPolling();<commit_msg>device import & export non-primary-color<commit_after><template>

  <CoreBase
    :appBarTitle="currentPageAppBarTitle"
    :immersivePage="currentPageIsImmersive"
    :immersivePagePrimary="immersivePagePrimary"
    :immersivePageRoute="immersivePageRoute"
    :immersivePageIcon="immersivePageIcon"
    :toolbarTitle="currentPageAppBarTitle"
    :showSubNav="canManageContent && !currentPageIsImmersive"
  >
    <DeviceTopNav slot="sub-nav" />

    <transition name="delay-entry">
      <WelcomeModal
        v-if="welcomeModalVisible"
        @submit="hideWelcomeModal"
      />
    </transition>

    <KPageContainer>
      <component :is="currentPage" />
    </KPageContainer>
  </CoreBase>

</template>


<script>

  import { mapState, mapGetters, mapActions } from 'vuex';
  import CoreBase from 'kolibri.coreVue.components.CoreBase';
  import KPageContainer from 'kolibri.coreVue.components.KPageContainer';
  import { ContentWizardPages, PageNames } from '../constants';
  import DeviceTopNav from './DeviceTopNav';
  import ManageContentPage from './ManageContentPage';
  import ManagePermissionsPage from './ManagePermissionsPage';
  import UserPermissionsPage from './UserPermissionsPage';
  import DeviceInfoPage from './DeviceInfoPage';
  import WelcomeModal from './WelcomeModal';
  import AvailableChannelsPage from './AvailableChannelsPage';
  import SelectContentPage from './SelectContentPage';
  import DeviceSettingsPage from './DeviceSettingsPage';

  const pageNameComponentMap = {
    [PageNames.MANAGE_CONTENT_PAGE]: ManageContentPage,
    [PageNames.MANAGE_PERMISSIONS_PAGE]: ManagePermissionsPage,
    [PageNames.USER_PERMISSIONS_PAGE]: UserPermissionsPage,
    [PageNames.DEVICE_INFO_PAGE]: DeviceInfoPage,
    [ContentWizardPages.AVAILABLE_CHANNELS]: AvailableChannelsPage,
    [ContentWizardPages.SELECT_CONTENT]: SelectContentPage,
    [PageNames.DEVICE_SETTINGS_PAGE]: DeviceSettingsPage,
  };

  export default {
    name: 'DeviceIndex',
    components: {
      CoreBase,
      WelcomeModal,
      DeviceTopNav,
      KPageContainer,
    },
    computed: {
      ...mapGetters(['canManageContent']),
      ...mapState(['pageName', 'welcomeModalVisible']),
      ...mapState('coreBase', ['appBarTitle']),
      ...mapGetters('coreBase', [
        'currentPageIsImmersive',
        'immersivePageIcon',
        'immersivePageRoute',
        'inContentManagementPage',
      ]),
      currentPage() {
        return pageNameComponentMap[this.pageName];
      },
      currentPageAppBarTitle() {
        if (this.pageName === PageNames.USER_PERMISSIONS_PAGE) {
          return this.$tr('permissionsLabel');
        } else {
          return this.appBarTitle || this.$tr('deviceManagementTitle');
        }
      },
      immersivePagePrimary() {
        return this.immersivePageIcon === "arrow_back";
      }
    },
    watch: {
      inContentManagementPage(val) {
        return val ? this.startTaskPolling() : this.stopTaskPolling();
{'fraction_non_alphanumeric': 0.11594202898550725, 'fraction_numerical': 0.0, 'mean_word_length': 3.786952931461602, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, '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': '3872448', 'n_tokens_mistral': 1703, 'n_tokens_neox': 1696, 'n_words': 276}