"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// tslint:disable: object-literal-sort-keys
const native_1 = require("../native");
const components_1 = require("../components/");
exports.components = {
    /**
     * Registers all components that ship with BlueBase
     */
    'bluebase.components.register.internal': [
        {
            key: 'bluebase-components-register-internal-default',
            priority: 5,
            value: async (bootOptions, _ctx, BB) => {
                await BB.Components.registerCollection({
                    // BlueBase Components
                    BlueBaseContent: components_1.BlueBaseContent,
                    BlueBaseFilter: { applyStyles: false, value: components_1.BlueBaseFilter },
                    BlueBaseImage: components_1.BlueBaseImage,
                    ComponentState: components_1.ComponentState,
                    DataObserver: components_1.DataObserver,
                    DynamicIcon: components_1.DynamicIcon,
                    EmptyState: components_1.EmptyState,
                    ErrorObserver: components_1.ErrorObserver,
                    ErrorState: components_1.ErrorState,
                    FormattedMessage: components_1.FormattedMessage,
                    HomeScreen: components_1.HomeScreen,
                    HoverObserver: components_1.HoverObserver,
                    Icon: components_1.Noop,
                    Link: components_1.Link,
                    LoadingState: components_1.LoadingState,
                    Navigation: components_1.Navigation,
                    NavigationActions: components_1.NavigationActions,
                    Noop: { applyStyles: false, value: components_1.Noop },
                    PluginIcon: components_1.PluginIcon,
                    Redirect: { applyStyles: false, value: components_1.Redirect },
                    StatefulComponent: components_1.StatefulComponent,
                    TouchableItem: components_1.TouchableItem,
                    WaitObserver: components_1.WaitObserver,
                    // Native
                    ActivityIndicator: native_1.ActivityIndicator,
                    Button: native_1.Button,
                    FlatList: native_1.FlatList,
                    Image: native_1.Image,
                    ImageBackground: native_1.ImageBackground,
                    Picker: native_1.Picker,
                    SafeAreaView: native_1.SafeAreaView,
                    ScrollView: native_1.ScrollView,
                    Slider: native_1.Slider,
                    Switch: native_1.Switch,
                    Text: native_1.Text,
                    TextInput: native_1.TextInput,
                    View: { applyStyles: false, value: native_1.View },
                    // Typography
                    H1: {
                        value: native_1.Text,
                        styles: (theme) => ({ root: theme.typography.h1 }),
                    },
                    H2: {
                        value: native_1.Text,
                        styles: (theme) => ({ root: theme.typography.h2 }),
                    },
                    H3: {
                        value: native_1.Text,
                        styles: (theme) => ({ root: theme.typography.h3 }),
                    },
                    H4: {
                        value: native_1.Text,
                        styles: (theme) => ({ root: theme.typography.h4 }),
                    },
                    H5: {
                        value: native_1.Text,
                        styles: (theme) => ({ root: theme.typography.h5 }),
                    },
                    H6: {
                        value: native_1.Text,
                        styles: (theme) => ({ root: theme.typography.h6 }),
                    },
                    Subtitle1: {
                        value: native_1.Text,
                        styles: (theme) => ({ root: theme.typography.subtitle1 }),
                    },
                    Subtitle2: {
                        value: native_1.Text,
                        styles: (theme) => ({ root: theme.typography.subtitle2 }),
                    },
                    Body1: {
                        value: native_1.Text,
                        styles: (theme) => ({ root: theme.typography.body1 }),
                    },
                    Body2: {
                        value: native_1.Text,
                        styles: (theme) => ({ root: theme.typography.body2 }),
                    },
                    Caption: {
                        value: native_1.Text,
                        styles: (theme) => ({ root: theme.typography.caption }),
                    },
                    Overline: {
                        value: native_1.Text,
                        styles: (theme) => ({ root: theme.typography.overline }),
                    },
                });
                return bootOptions;
            },
        },
    ],
    /**
     * This filter registers components from bootOptions.components property.
     * These are the components typically set in the bluebase.js file.
     */
    'bluebase.components.register': [
        {
            key: 'bluebase-components-register-default',
            priority: 5,
            // tslint:disable-next-line:object-literal-sort-keys
            value: async (bootOptions, _ctx, BB) => {
                await BB.Components.registerCollection(bootOptions.components);
                return bootOptions;
            },
        },
    ],
};
