"use strict";
(() => {
var exports = {};
exports.id = 2888;
exports.ids = [2888];
exports.modules = {

/***/ 7218:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  "default": () => (/* binding */ DataSquirel)
});

// EXTERNAL MODULE: external "react/jsx-runtime"
var jsx_runtime_ = __webpack_require__(997);
// EXTERNAL MODULE: external "react"
var external_react_ = __webpack_require__(6689);
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
// EXTERNAL MODULE: ./node_modules/next/script.js
var script = __webpack_require__(4298);
var script_default = /*#__PURE__*/__webpack_require__.n(script);
// EXTERNAL MODULE: external "next/head"
var head_ = __webpack_require__(968);
var head_default = /*#__PURE__*/__webpack_require__.n(head_);
// EXTERNAL MODULE: external "@mui/material/styles"
var styles_ = __webpack_require__(8442);
// EXTERNAL MODULE: ./functions/frontend/fetchApi.js
var fetchApi = __webpack_require__(6729);
// EXTERNAL MODULE: ./layouts/GeneralLayout.jsx + 1 modules
var GeneralLayout = __webpack_require__(6217);
// EXTERNAL MODULE: ./components/general/PageHeadTags.jsx
var PageHeadTags = __webpack_require__(4097);
;// CONCATENATED MODULE: ./components/ErrorBoundary.jsx
// @ts-check





class ErrorBoundary extends (external_react_default()).Component {
    constructor(/** @type {any} */ props){
        super(props);
        // Define a state variable to track whether is an error or not
        this.state = {
            hasError: false
        };
        /**
         * Javascript Variables
         *
         * @abstract Non hook variables and functions
         */ const pageTitle = "Error | Datasquirel";
        const pageDescription = "Datasquirel is a fast and efficient cloud-based SQL data management system that takes away the entire hassle of dealing with data both locally and across different platforms.";
        let head = /*#__PURE__*/ (0,jsx_runtime_.jsxs)((external_react_default()).Fragment, {
            children: [
                /*#__PURE__*/ jsx_runtime_.jsx("title", {
                    children: pageTitle
                }),
                /*#__PURE__*/ jsx_runtime_.jsx("meta", {
                    name: "description",
                    content: pageDescription
                }),
                /*#__PURE__*/ jsx_runtime_.jsx(PageHeadTags/* default */.Z, {
                    pageTitle: pageTitle,
                    pageDescription: pageDescription,
                    pagePathname: "/"
                })
            ]
        });
        // @ts-ignore
        this.state.head = head;
    }
    static getDerivedStateFromError() {
        return {
            hasError: true
        };
    }
    componentDidCatch(/** @type {any} */ error, /** @type {any} */ errorInfo) {
        (0,fetchApi/* default */.Z)("/api/admin/clientError", {
            method: "post",
            body: {
                component: "ErrorBoundary-class-component",
                message: error.message + " ==== Error Info => " + errorInfo,
                user: {}
            }
        });
    }
    render() {
        // Check if the error is thrown
        if (this.state.hasError) {
            // You can render any custom fallback UI
            return /*#__PURE__*/ jsx_runtime_.jsx(GeneralLayout/* default */.Z, {
                // @ts-ignore
                head: this.state.head,
                user: null,
                children: /*#__PURE__*/ (0,jsx_runtime_.jsxs)("div", {
                    className: "paper items-center px-20",
                    children: [
                        /*#__PURE__*/ jsx_runtime_.jsx("h2", {
                            className: "text-base text-slate-400 m-0",
                            children: "Application Error!"
                        }),
                        /*#__PURE__*/ jsx_runtime_.jsx("h1", {
                            className: "text-2xl m-0 mb-4",
                            children: "Please try again!"
                        }),
                        /*#__PURE__*/ (0,jsx_runtime_.jsxs)("div", {
                            children: [
                                /*#__PURE__*/ jsx_runtime_.jsx("a", {
                                    href: "/",
                                    className: "button outlined",
                                    children: "Home"
                                }),
                                /*#__PURE__*/ jsx_runtime_.jsx("button", {
                                    onClick: (e)=>{
                                        window.history.back();
                                    },
                                    children: "Go Back"
                                })
                            ]
                        })
                    ]
                })
            });
        }
        // Return children components in case of no error
        return this.props.children;
    }
}
/* harmony default export */ const components_ErrorBoundary = (ErrorBoundary);

;// CONCATENATED MODULE: ./functions/theme.js
// @ts-check

const theme = (0,styles_.createTheme)({
    typography: {
        fontFamily: "inherit",
        fontSize: 14
    },
    palette: {
        primary: {
            main: "#00948a"
        },
        secondary: {
            main: "#107ab8"
        },
        light: {
            main: "#c48ff0"
        },
        white: {
            main: "#ffffff"
        },
        grey: {
            // @ts-ignore
            main: "#64748b"
        },
        gray: {
            main: "#64748b"
        },
        dark: {
            main: "#1e293b"
        }
    }
});
/* harmony default export */ const functions_theme = (theme);

;// CONCATENATED MODULE: ./pages/_app.js
// @ts-check
/**
 * ==============================================================================
 * Imports
 * ==============================================================================
 */ 




////////////////////////////////////////
////////////////////////////////////////
////////////////////////////////////////
// import "../styles/main.css";




// require()();
/** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /**
 * App Component
 * ==============================================================================
 * @param {import("next/app").AppProps} props
 */ function DataSquirel({ Component , pageProps  }) {
    /**
     * React Hooks
     *
     * @description { useState, useEffect, useRef, etc ... }
     */ ////////////////////////////////////////
    ////////////////////////////////////////
    ////////////////////////////////////////
    /**
     * Function Return
     *
     * @description Main Function Return
     */ return /*#__PURE__*/ (0,jsx_runtime_.jsxs)((external_react_default()).Fragment, {
        children: [
            /*#__PURE__*/ jsx_runtime_.jsx((head_default()), {
                children: /*#__PURE__*/ jsx_runtime_.jsx("meta", {
                    name: "viewport",
                    content: "width=device-width, initial-scale=1"
                })
            }),
            /*#__PURE__*/ jsx_runtime_.jsx(components_ErrorBoundary, {
                children: /*#__PURE__*/ jsx_runtime_.jsx(styles_.ThemeProvider, {
                    theme: functions_theme,
                    children: /*#__PURE__*/ jsx_runtime_.jsx(Component, {
                        ...pageProps
                    })
                })
            }),
            /*#__PURE__*/ jsx_runtime_.jsx((script_default()), {
                src: "/scripts/main.js",
                strategy: "afterInteractive"
            })
        ]
    });
}


/***/ }),

/***/ 386:
/***/ ((module) => {

module.exports = require("@mui/icons-material/CottageTwoTone");

/***/ }),

/***/ 5557:
/***/ ((module) => {

module.exports = require("@mui/icons-material/MenuBookTwoTone");

/***/ }),

/***/ 8442:
/***/ ((module) => {

module.exports = require("@mui/material/styles");

/***/ }),

/***/ 2423:
/***/ ((module) => {

module.exports = require("lucide-react");

/***/ }),

/***/ 2796:
/***/ ((module) => {

module.exports = require("next/dist/shared/lib/head-manager-context.js");

/***/ }),

/***/ 968:
/***/ ((module) => {

module.exports = require("next/head");

/***/ }),

/***/ 6689:
/***/ ((module) => {

module.exports = require("react");

/***/ }),

/***/ 997:
/***/ ((module) => {

module.exports = require("react/jsx-runtime");

/***/ })

};
;

// load runtime
var __webpack_require__ = require("../webpack-runtime.js");
__webpack_require__.C(exports);
var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
var __webpack_exports__ = __webpack_require__.X(0, [4298,4017,8313,5264,6729,5449,913,9360,6217,4097], () => (__webpack_exec__(7218)));
module.exports = __webpack_exports__;

})();