"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const core_1 = require("@bluebase/core");
const SettingsPageList = core_1.getComponent('SettingsPageList');
const SettingsPageMobile = core_1.getComponent('SettingsPageMobile');
exports.createMobileRoutes = (route, pages = []) => {
    return [
        Object.assign({}, route, { exact: true, screen: (props) => react_1.default.createElement(SettingsPageList, Object.assign({ name: route.name, pages: pages }, props)) }),
        // Sub routes
        ...pages.map(page => (Object.assign({}, page, { exact: true, screen: (props) => react_1.default.createElement(SettingsPageMobile, Object.assign({ items: page.items }, props)) })))
    ];
};
