"use strict";
exports.id = 6796;
exports.ids = [6796];
exports.modules = {

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

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (/* binding */ InPlaceSignInOrUp)
/* harmony export */ });
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(920997);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var components_auth_sign_in__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(683144);
/* harmony import */ var components_auth_sign_up__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(150081);
/* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(371853);
/* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(616689);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(545725);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(antd__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _cocalc_frontend_components_icon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(807772);
/* harmony import */ var _cocalc_frontend_components_icon__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_cocalc_frontend_components_icon__WEBPACK_IMPORTED_MODULE_6__);

// TODO: below we need to get the strategies!
// and also requiresToken for SignUp!






function InPlaceSignInOrUp({ title , why , onSuccess  }) {
    const router = (0,next_router__WEBPACK_IMPORTED_MODULE_3__.useRouter)();
    const { 0: show , 1: setShow  } = (0,react__WEBPACK_IMPORTED_MODULE_4__.useState)("");
    return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
        style: {
            textAlign: "center"
        },
        children: [
            /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_5__.Divider, {
                children: [
                    /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_cocalc_frontend_components_icon__WEBPACK_IMPORTED_MODULE_6__.Icon, {
                        name: "sign-in",
                        style: {
                            marginRight: "10px"
                        }
                    }),
                    " ",
                    title
                ]
            }),
            /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("a", {
                onClick: ()=>setShow("sign-in")
                ,
                children: "Sign In"
            }),
            " or",
            " ",
            /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("a", {
                onClick: ()=>setShow("sign-up")
                ,
                children: "Sign Up"
            }),
            " ",
            why,
            ".",
            /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("br", {}),
            /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("br", {}),
            show == "sign-in" && /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(components_auth_sign_in__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, {
                minimal: true,
                onSuccess: onSuccess ?? (()=>router.push({
                        pathname: router.asPath.split("?")[0],
                        query: {
                            edit: "true"
                        }
                    })
                )
            }),
            show == "sign-up" && /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(components_auth_sign_up__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, {
                minimal: true,
                onSuccess: onSuccess ?? (()=>router.push({
                        pathname: router.asPath.split("?")[0],
                        query: {
                            edit: "true"
                        }
                    })
                )
            })
        ]
    });
};


/***/ })

};
;