import { v4 as uuidv4 } from "uuid";
import { nanoid } from "nanoid";
export const initialSchema = {
    tables: [],
    views: [],
    insights: [],
    queries: [],
};
export const initialPage = {
    components: [],
    id: nanoid(3),
    properties: {
        values: {
            title: "New page",
            onOpen: [{ type: "none" }],
            onScrollToBottom: [{ type: "none" }],
            headerStyle: "default",
            action: [{ type: "none" }],
            icon: "none",
            refreshInterval: 0,
            onSuccess: [{ type: "none" }],
        },
        deletableForm: false,
    },
    title: "Untitled page",
    defaultRow: {
        type: "row-id",
        rowId: "",
    },
    staticId: false,
    navbar: {
        bottom: {
            show: true,
        },
        sidetop: {
            show: true,
        },
        drawer: {
            show: true,
        },
    },
};
export const initialApp = {
    name: "Application",
    description: "",
    icon: "",
    theme_color: "#049fdc",
    config: {
        projectID: "unknown",
        appID: "",
        endpoint: "",
        id: uuidv4(),
        initialPage: {
            entryPage: "",
            loggedInPage: "",
        },
    },
    integrations: {},
    maps: {
        component: {
            login_component: {
                id: "login_component",
                componentID: "Login",
                options: {},
                properties: {},
                showCondition: { type: "all", conditions: [] },
                disableCondition: { type: "all", conditions: [] },
                source: {
                    type: "list",
                    params: {},
                    sorts: {},
                },
                metadata: {},
            },
            register_text_input: {
                componentID: "Text Input",
                options: {},
                showCondition: { type: "all", conditions: [] },
                disableCondition: { type: "all", conditions: [] },
                id: "register_text_input",
                properties: {
                    label: "Email",
                    placeholder: "Enter your email here",
                    hidden: false,
                    defaultValue: "",
                    data: {
                        inputID: "external_id",
                        field: {
                            type: "string",
                            options: {
                                format: "text",
                            },
                        },
                        validation: {
                            required: false,
                        },
                        type: "field",
                    },
                },
                source: {
                    type: "record",
                    params: {},
                    rowId: null,
                    defaultRow: { type: "first-row" },
                },
                metadata: {},
            },
            register_password_input: {
                componentID: "Password",
                options: {},
                showCondition: { type: "all", conditions: [] },
                disableCondition: { type: "all", conditions: [] },
                id: "register_password_input",
                properties: {
                    title: "Password",
                    placeholder: "Enter your password here",
                    confirmPassword: true,
                    confirmTitle: "Confirm Password",
                    confirmPlaceholder: "Reenter your password here",
                    data: {
                        inputID: "password",
                        field: {
                            type: "string",
                            options: {
                                format: "text",
                            },
                        },
                        validation: {
                            required: true,
                        },
                        type: "field",
                    },
                },
                source: {
                    type: "record",
                    params: {},
                    rowId: null,
                    defaultRow: { type: "first-row" },
                },
                metadata: {},
            },
            register_role_input: {
                componentID: "Role",
                options: {},
                showCondition: { type: "all", conditions: [] },
                disableCondition: { type: "all", conditions: [] },
                id: "register_role_input",
                properties: {
                    roleId: "",
                },
                source: {
                    type: "record",
                    params: {},
                    rowId: null,
                    defaultRow: { type: "first-row" },
                },
                metadata: {},
            },
            forbidden_component: {
                id: "forbidden_component",
                componentID: "Forbidden",
                options: {},
                showCondition: { type: "all", conditions: [] },
                disableCondition: { type: "all", conditions: [] },
                properties: {},
                metadata: {},
                source: {
                    type: "record",
                    params: {},
                    rowId: null,
                    defaultRow: { type: "first-row" },
                },
            },
        },
        page: {
            login: Object.assign(Object.assign({}, initialPage), { id: "login", components: [{ component: "login_component" }], type: "system", title: "Login" }),
            register: Object.assign(Object.assign({}, initialPage), { id: "register", components: [
                    {
                        component: "register_text_input",
                    },
                    {
                        component: "register_password_input",
                    },
                    {
                        component: "register_role_input",
                    },
                ], type: "system", title: "Register", sourceID: "users", mode: "form" }),
            forbidden: Object.assign(Object.assign({}, initialPage), { id: "forbidden", components: [{ component: "forbidden_component" }], type: "system", title: "Forbidden" }),
        },
    },
    theme: {
        id: "Light",
        options: { primaryColor: "#1890ff" },
        navigationLayout: "sidebar",
        fonts: {
            heading: ["Inter", ""],
            body: ["Inter", ""],
        },
    },
    navbar: {
        bottom: {
            showLabel: true,
            content: [],
        },
        sidetop: {
            position: "sidebar",
            collapsible: false,
            content: {
                rootId: "root",
                items: {
                    root: {
                        id: "root",
                        children: [],
                        hasChildren: true,
                        isExpanded: true,
                        isChildrenLoading: false,
                        data: {
                            label: "root tree",
                            icon: "",
                            page: "",
                            linked: true,
                        },
                    },
                },
            },
        },
    },
    schema: initialSchema,
    customSources: {},
    components: [],
};
//# sourceMappingURL=InitialData.js.map