"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = require("@bluebase/core");
const SettingsPage_1 = require("./components/SettingsPage");
const SettingsPageItem_1 = require("./components/SettingsPageItem");
const DirectionPicker_1 = require("./components/DirectionPicker");
const LocalePicker_1 = require("./components/LocalePicker");
const LocalizationSettingsList_1 = require("./components/LocalizationSettingsList");
const SettingsAppIcon_1 = require("./components/SettingsAppIcon");
const SettingsPageList_1 = require("./components/SettingsPageList");
const ThemeDarkModeSwitch_1 = require("./components/ThemeDarkModeSwitch");
const ThemePicker_1 = require("./components/ThemePicker");
const ThemeSettingsList_1 = require("./components/ThemeSettingsList");
const createSettingsRoutes_1 = require("./createSettingsRoutes");
const pages_1 = require("./pages");
// import { isMobile } from './isMobile';
var createSettingsRoutes_2 = require("./createSettingsRoutes");
exports.createSettingsRoutes = createSettingsRoutes_2.createSettingsRoutes;
exports.default = core_1.createPlugin({
    description: 'A settings app for the BlueBase framework!',
    key: 'settings',
    name: 'Settings',
    version: '1.0.0',
    icon: {
        component: 'SettingsAppIcon',
        type: 'component',
    },
    defaultConfigs: {
        /** Enable appearnace page */
        'plugin.settings-app.appearance': false,
        /** Enable theme section, on appearnace page */
        'plugin.settings-app.appearance.theme': false,
        /** Enable dark mode setting in theme section, on appearnace page */
        'plugin.settings-app.appearance.theme.dark-mode': false,
        /** Enable theme selection setting in theme section, on appearnace page */
        'plugin.settings-app.appearance.theme.selection': false,
        /** Enable appearnace page */
        'plugin.settings-app.language': false,
        /** Enable language section, on language page */
        'plugin.settings-app.language.language': false,
        /** Enable writing direction setting in language section, on language page */
        'plugin.settings-app.language.language.writing-direction': false,
        /** Enable language selection setting in language section, on language page */
        'plugin.settings-app.language.language.selection': false,
        /** Enable appearnace page */
        'plugin.settings-app.about': false,
    },
    components: {
        // HomeScreen,
        // Core components
        SettingsAppIcon: SettingsAppIcon_1.SettingsAppIcon,
        SettingsPageDesktop: SettingsPage_1.SettingsPageDesktop,
        SettingsPageItemDesktop: SettingsPageItem_1.SettingsPageItemDesktop,
        SettingsPageItemMobile: SettingsPageItem_1.SettingsPageItemMobile,
        SettingsPageList: SettingsPageList_1.SettingsPageList,
        SettingsPageMobile: SettingsPage_1.SettingsPageMobile,
        // Addons 
        DirectionPicker: DirectionPicker_1.DirectionPicker,
        LocalePicker: LocalePicker_1.LocalePicker,
        LocalizationSettingsList: LocalizationSettingsList_1.LocalizationSettingsList,
        ThemeDarkModeSwitch: ThemeDarkModeSwitch_1.ThemeDarkModeSwitch,
        ThemePicker: ThemePicker_1.ThemePicker,
        ThemeSettingsList: ThemeSettingsList_1.ThemeSettingsList,
    },
    routes: (_BB) => {
        // console.log('yayy', BB);
        return createSettingsRoutes_1.createSettingsRoutes({
            name: 'SettingsApp',
            path: '',
            navigationOptions: {
                title: 'My App Settings',
            }
        }, pages_1.pages);
    },
    filters: {
        'bluebase.intl.messages.ur': (messages) => (Object.assign({}, messages, { 'Language': 'زبان', 'You can change the app\'s default language from here': 'آپ یہاں سے اے پی پی کی ڈیفالٹ زبان تبدیل کر سکتے ہیں' }))
    }
});
