import { r as reactExports, u as useAtomValue, a as appConfig, j as jsxRuntimeExports, G as Grid, A as Autocomplete, n as match, p as parse, o as CircularProgress, b as axios, q as useNavigate, T as Tooltip, I as IconButton, R as RefreshIcon, B as Button, F as FormControl, f as InputLabel, O as OutlinedInput, h as FormHelperText, C as Container, c as CssBaseline, d as Box, g as InputAdornment, i as FormControlLabel, k as Checkbox, L as Link, D as Dialog, l as DialogContent, m as DialogContentText, s as IMaskInput, S as Slide } from "./index-D15x63tD.js";
import { C as CssTextField, V as VisibilityOff, a as Visibility, W as WhereNavigate } from "./SignIn-BbTs8zBq.js";
import { A as AlertDialogSlide } from "./Alert-Bz9RX1jF.js";
const SelectUser = (props) => {
  const [value, setValue] = reactExports.useState();
  const [users, setUserList] = reactExports.useState(new Array());
  const [inputValue, setInputValue] = reactExports.useState("");
  const [loading, setLoad] = reactExports.useState(true);
  const config = useAtomValue(appConfig);
  reactExports.useEffect(() => {
    setUserList([]);
  }, [props.inn]);
  let url = config.lk.url.fio;
  const getUser = () => {
    setLoad(true);
    let params = /* @__PURE__ */ new Map();
    params.set("prefix", "project");
    params.set("comand", "GetRegistryValues");
    params.set("type", "snils");
    params.set("inn", props.inn);
    axios.get(url + `&inn=${props.inn}`).then((response) => {
      if (Object.keys(response.data).length == 0) {
        setUserList([]);
        setLoad(false);
      } else {
        setLoad(false);
        setUserList(response.data);
      }
    });
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Grid, { item: true, xs: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
    Autocomplete,
    {
      loading,
      loadingText: props.inn == void 0 ? "Необходимо выбрать организацию" : /* @__PURE__ */ jsxRuntimeExports.jsx(CircularProgress, {}),
      onOpen: getUser,
      disableClearable: true,
      options: users,
      getOptionLabel: (option) => option.name || "",
      fullWidth: true,
      noOptionsText: "Ничего не найдено.",
      value,
      inputValue,
      onInputChange: (event, newInputValue) => {
        setInputValue(newInputValue);
      },
      onChange: (event, newValue) => {
        setValue(newValue.name);
        props.setBackInfo(newValue.snils);
      },
      renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(
        CssTextField,
        {
          ...params,
          required: true,
          id: "snils",
          label: "ФИО",
          name: "snils",
          error: props.error.search("snils") !== -1
        }
      ),
      renderOption: (props2, option, { inputValue: inputValue2 }) => {
        const text = option.name;
        const matches = match(text, inputValue2);
        const parts = parse(text, matches);
        return /* @__PURE__ */ reactExports.createElement("li", { ...props2, key: `${props2.key}_${props2.id}` }, /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: parts.map((part, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(
          "span",
          {
            style: {
              fontWeight: part.highlight ? 700 : 400
            },
            children: part.text
          },
          index
        )) }));
      }
    }
  ) });
};
const SelectOrg = (props) => {
  const config = useAtomValue(appConfig);
  const [value, setValue] = reactExports.useState();
  const [inputValue, setInputValue] = reactExports.useState("");
  const [orgs, setOrgList] = reactExports.useState([]);
  const [loading, setLoad] = reactExports.useState(true);
  const url = config.lk.url.org;
  const getOrg = () => {
    setLoad(true);
    let params = /* @__PURE__ */ new Map();
    params.set("prefix", "project");
    params.set("comand", "GetRegistryValues");
    params.set("type", "inn");
    axios.get(url).then((response) => {
      if (Object.keys(response.data).length == 0) {
        setOrgList([]);
      } else {
        setLoad(false);
        setOrgList(response.data);
      }
    });
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Grid, { item: true, xs: 12, sm: 12, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
    Autocomplete,
    {
      loading,
      onOpen: () => {
        setOrgList([]);
        getOrg();
      },
      loadingText: /* @__PURE__ */ jsxRuntimeExports.jsx(CircularProgress, {}),
      disableClearable: true,
      fullWidth: true,
      value,
      noOptionsText: "Ничего не найдено",
      onChange: (event, newValue) => {
        setValue(value);
        props.setBackInfo(newValue.inn);
      },
      inputValue,
      onInputChange: (event, newInputValue) => {
        setInputValue(newInputValue);
      },
      options: orgs,
      getOptionLabel: (option) => option.name || "",
      renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(
        CssTextField,
        {
          ...params,
          required: true,
          id: "inn",
          label: "Организация",
          name: "inn",
          error: props.error.search("inn") !== -1,
          sx: {}
        }
      ),
      renderOption: (props2, option, { inputValue: inputValue2 }) => {
        const text = option.name;
        const matches = match(text, inputValue2);
        const parts = parse(text, matches);
        return /* @__PURE__ */ reactExports.createElement("li", { ...props2, key: `${props2.key}_${props2.id}` }, /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: parts.map((part, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(
          "span",
          {
            style: {
              fontWeight: part.highlight ? 700 : 400
            },
            children: part.text
          },
          index
        )) }));
      }
    }
  ) });
};
const Transition = reactExports.forwardRef(function Transition2(props, ref) {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Slide, { direction: "up", ref, ...props });
});
const TextMaskCustom = reactExports.forwardRef(function TextMaskCustom2(props, ref) {
  const { onChange, ...other } = props;
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    IMaskInput,
    {
      ...other,
      mask: "000-000-000 00",
      definitions: {
        "#": /[1-9]/
      },
      inputRef: ref,
      onAccept: (value) => onChange({ target: { name: props.name, value } }),
      overwrite: true
    }
  );
});
function SignUp() {
  var _a;
  const config = useAtomValue(appConfig);
  var pattern = new RegExp(
    /^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i
  );
  document.title = "Регистрация";
  const navigate = useNavigate();
  const [open, setOpen] = reactExports.useState(false);
  const [status, setStatus] = reactExports.useState(false);
  const [message, setMessage] = reactExports.useState("");
  const [snils, setSnils] = reactExports.useState("");
  const [inn, setInn] = reactExports.useState();
  const [snilsError, setSnilsError] = reactExports.useState("");
  const [password, setPassword] = reactExports.useState("");
  const [error, setError] = reactExports.useState("");
  const [email, setEmail] = reactExports.useState("");
  const [captcha, setCaptcha] = reactExports.useState("");
  const [helperTextLogin, sethelperTextLogin] = reactExports.useState("");
  const [helperTextPassword, sethelperTextPassword] = reactExports.useState("");
  const [DataCaptcha, setDataCapctha] = reactExports.useState({
    passed: config.lk.baseCaptcha === "0" ? true : false,
    color: ""
  });
  const [showpassword, setShowPassword] = reactExports.useState(false);
  const [checked, setChecked] = reactExports.useState(false);
  const [isRequestLoading, setIsRequestLoading] = reactExports.useState(false);
  const url = (_a = config.lk.url) == null ? void 0 : _a.signUP;
  reactExports.useEffect(() => {
    if (config.lk.baseCaptcha === "1") getCaptha();
  }, []);
  const handleClickShowPassword = () => {
    setShowPassword(!showpassword);
  };
  const getCaptha = (color) => {
    var _a2;
    axios.get((_a2 = config.lk.url) == null ? void 0 : _a2.captcha).then((res) => {
      setCaptcha("");
      setDataCapctha({
        img: "data:image/gif;base64," + res.data.RCDATA,
        ident: res.data.ident,
        passed: false,
        color: color ? color : ""
      });
    });
  };
  const handleChangeCheckBox = (event) => {
    setChecked(event.target.checked);
    if (error.search(event.target.id) !== -1) {
      setError(error.replace(event.target.id, ""));
    }
  };
  const unableError = (event) => {
    const name = event.target.id;
    if (error.search(name) !== -1) {
      setError(error.replace(name, ""));
    }
  };
  const handleChangePassword = (event) => {
    let errorLocal = error;
    if (event.target.id === "password") {
      setPassword(event.target.value);
    } else {
      errorLocal.replaceAll("passwordSubmit", "");
      if (password !== event.target.value) {
        errorLocal += "passwordSubmit";
        sethelperTextPassword("Пароли должны совпадать!");
      } else {
        sethelperTextPassword("");
      }
    }
    setError(errorLocal);
  };
  const sendCaptha = () => {
    var _a2;
    axios.get(`${(_a2 = config.lk.url) == null ? void 0 : _a2.captcha}?ident=${DataCaptcha.ident}&check=${captcha}`).then((res) => {
      if (res.data.result === "1") {
        setDataCapctha({ ...DataCaptcha, passed: true, color: "Успешно." });
      } else {
        getCaptha("Повторите ещё раз.");
      }
    });
  };
  const handleChangeSNILS = (event) => {
    let clearSnils = event.target.value;
    clearSnils = clearSnils.replaceAll("-", "");
    clearSnils = clearSnils.replaceAll(" ", "");
    setSnils(event.target.value);
    if (validateSnils(clearSnils)) {
      setSnilsError("");
    }
  };
  const CapthaJSX = /* @__PURE__ */ jsxRuntimeExports.jsx(Grid, { item: true, xs: 10, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
    Grid,
    {
      container: true,
      direction: "column",
      justifyContent: "center",
      alignItems: "center",
      spacing: 1,
      style: {
        borderStyle: "solid",
        borderWidth: "1px",
        borderRadius: "4px",
        borderColor: "rgb(60, 91, 119)"
      },
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(Grid, { item: true, style: { width: "100%", backgroundColor: "rgb(60, 91, 119)" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          "img",
          {
            src: DataCaptcha.img,
            style: {
              borderStyle: "solid",
              borderWidth: "1px",
              borderColor: "rgb(236, 236, 236)",
              width: "97%"
            }
          }
        ) }),
        /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid, { container: true, direction: "row", justifyContent: "center", alignItems: "center", children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Обновить текст на картинке", placement: "left", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            IconButton,
            {
              onClick: () => {
                getCaptha();
              },
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(RefreshIcon, { fontSize: "small" })
            }
          ) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Grid, { item: true, sx: { pb: 1, pt: 1 }, style: { width: "179px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            CssTextField,
            {
              size: "small",
              id: "captha",
              name: "captha",
              value: captcha,
              sx: { ".MuiInputLabel-outlined": { fontSize: "12px" } },
              label: "Введите текст с картинки",
              helperText: DataCaptcha.color,
              onChange: (e) => {
                setCaptcha(e.target.value);
              }
            }
          ) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            Grid,
            {
              item: true,
              sx: { p: 1 },
              style: {
                display: "flex",
                justifyContent: "center"
              },
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                Button,
                {
                  style: {
                    backgroundColor: "#3c5b77",
                    textTransform: "none"
                  },
                  size: "small",
                  variant: "contained",
                  onClick: sendCaptha,
                  children: "Отправить"
                }
              )
            }
          )
        ] })
      ]
    }
  ) });
  const SnilsType = /* @__PURE__ */ jsxRuntimeExports.jsx(Grid, { item: true, xs: 12, sm: 12, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
    FormControl,
    {
      fullWidth: true,
      variant: "outlined",
      sx: {
        "& .MuiOutlinedInput-root": {
          "&.Mui-focused fieldset": { borderColor: "#3c5b77" }
        }
      },
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(InputLabel, { required: true, htmlFor: "snils", sx: { "&.Mui-focused": { color: "#3c5b77" } }, children: "СНИЛС" }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          OutlinedInput,
          {
            required: true,
            fullWidth: true,
            value: snils,
            onChange: handleChangeSNILS,
            name: "snils",
            id: "snils",
            label: "СНИЛС",
            error: error.search("snils") !== -1,
            inputComponent: TextMaskCustom
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsx(FormHelperText, { children: snilsError })
      ]
    }
  ) });
  const handleMouseDownPassword = (event) => {
    event.preventDefault();
  };
  const handleClose = () => {
    setOpen(false);
    if (status === true) {
      navigate(WhereNavigate());
    }
  };
  const handleSubmit = (event) => {
    event.preventDefault();
    const data = new FormData(event.currentTarget);
    let errors = "";
    let SignUpData = {
      login: data.get("login"),
      email: data.get("email"),
      password: data.get("password"),
      inn,
      snils
    };
    if (config.lk.baseSnilsOrFio === void 0) {
      SignUpData.snils = "e-mail";
    }
    if (!checked) {
      errors += "checkbox";
      setError(errors);
    }
    for (const [key, value] of Object.entries(SignUpData)) {
      if (value === "" || value === void 0) {
        errors += key;
        setError(errors);
      }
      if (key === "email" && pattern.test(email) === false) {
        errors += key;
        setError(errors);
      }
      if (key === "snils" && snilsError !== "") {
        errors += key;
        setError(errors);
      }
    }
    if (errors === "") {
      setIsRequestLoading(true);
      axios.post(url, JSON.stringify(SignUpData)).then((response) => {
        setIsRequestLoading(false);
        if (response.data["status"] === "ok") {
          setStatus(true);
          setMessage(response.data["message"]);
          sethelperTextPassword("");
        } else {
          setStatus(false);
          setMessage(response.data["status"]);
          switch (response.data.param) {
            case "login":
              sethelperTextPassword("");
              sethelperTextLogin(response.data.info);
              break;
            case "password":
              sethelperTextLogin("");
              sethelperTextPassword(response.data.info);
              break;
          }
        }
        setOpen(true);
      });
    }
  };
  const handleChange = (event) => {
    setEmail(event.target.value);
  };
  function validateSnils(snils2) {
    var result = false;
    if (typeof snils2 === "number") {
      snils2 = snils2.toString();
    } else if (typeof snils2 !== "string") {
      snils2 = "";
    }
    if (!snils2.length) {
      setSnilsError("СНИЛС пуст");
    } else if (/[^0-9]/.test(snils2)) {
      setSnilsError("СНИЛС может состоять только из цифр");
    } else if (snils2.length !== 11) {
      setSnilsError("СНИЛС может состоять только из 11 цифр");
    } else {
      let sum = 0;
      for (var i = 0; i < 9; i++) {
        sum += parseInt(snils2[i]) * (9 - i);
      }
      var checkDigit = 0;
      if (sum < 100) {
        checkDigit = sum;
      } else if (sum > 101) {
        checkDigit = sum % 101;
        if (checkDigit === 100) {
          checkDigit = 0;
        }
      }
      if (checkDigit === parseInt(snils2.slice(-2))) {
        result = true;
      } else {
        setSnilsError("Неправильное контрольное число");
      }
    }
    return result;
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Container, { component: "main", maxWidth: "xs", children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(CssBaseline, {}),
    /* @__PURE__ */ jsxRuntimeExports.jsxs(
      Box,
      {
        sx: {
          marginTop: 8,
          display: "flex",
          flexDirection: "column",
          alignItems: "center"
        },
        children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            "img",
            {
              src: "logo.png",
              style: {
                width: config.lk.baseWidthLogo ? config.lk.baseWidthLogo : "45%"
              }
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { component: "form", noValidate: true, onSubmit: handleSubmit, sx: { mt: 0.8 }, autoComplete: "off", children: [
            /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid, { container: true, spacing: 2, justifyContent: "center", children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(Grid, { item: true, xs: 12, sm: 12, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
                FormControl,
                {
                  fullWidth: true,
                  variant: "outlined",
                  sx: {
                    "& .MuiOutlinedInput-root": {
                      "&.Mui-focused fieldset": { borderColor: "#3c5b77" }
                    }
                  },
                  children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(InputLabel, { required: true, htmlFor: "login", sx: { "&.Mui-focused": { color: "#3c5b77" } }, children: "Логин" }),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      OutlinedInput,
                      {
                        type: "text",
                        required: true,
                        fullWidth: true,
                        id: "login",
                        label: "Пароль",
                        name: "login",
                        onChange: handleChangePassword,
                        error: error.search("login") !== -1
                      }
                    ),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(FormHelperText, { children: helperTextLogin })
                  ]
                }
              ) }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(Grid, { item: true, xs: 12, sm: 12, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                CssTextField,
                {
                  value: email,
                  onChange: handleChange,
                  required: true,
                  fullWidth: true,
                  id: "email",
                  label: "E-mail (Электронная почта для подтверждения регистрации)",
                  name: "email",
                  error: error.search("email") !== -1
                }
              ) }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(Grid, { item: true, xs: 12, sm: 12, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
                FormControl,
                {
                  fullWidth: true,
                  variant: "outlined",
                  sx: {
                    "& .MuiOutlinedInput-root": {
                      "&.Mui-focused fieldset": { borderColor: "#3c5b77" }
                    }
                  },
                  children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(InputLabel, { required: true, htmlFor: "password", sx: { "&.Mui-focused": { color: "#3c5b77" } }, children: "Пароль" }),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      OutlinedInput,
                      {
                        type: showpassword ? "text" : "password",
                        required: true,
                        fullWidth: true,
                        value: password,
                        id: "password",
                        label: "Пароль",
                        name: "password",
                        onChange: handleChangePassword,
                        error: error.search("password") !== -1,
                        endAdornment: /* @__PURE__ */ jsxRuntimeExports.jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                          IconButton,
                          {
                            "aria-label": "toggle password visibility",
                            onClick: handleClickShowPassword,
                            onMouseDown: handleMouseDownPassword,
                            edge: "end",
                            children: showpassword ? /* @__PURE__ */ jsxRuntimeExports.jsx(VisibilityOff, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(Visibility, {})
                          }
                        ) })
                      }
                    ),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(FormHelperText, { children: helperTextPassword })
                  ]
                }
              ) }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(Grid, { item: true, xs: 12, sm: 12, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
                FormControl,
                {
                  fullWidth: true,
                  variant: "outlined",
                  sx: {
                    "& .MuiOutlinedInput-root": {
                      "&.Mui-focused fieldset": { borderColor: "#3c5b77" }
                    }
                  },
                  children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(InputLabel, { required: true, htmlFor: "passwordSubmit", sx: { "&.Mui-focused": { color: "#3c5b77" } }, children: "Подтвердите пароль" }),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      OutlinedInput,
                      {
                        type: showpassword ? "text" : "password",
                        required: true,
                        onPaste: (e) => {
                          e.preventDefault();
                          return false;
                        },
                        onDrop: (e) => {
                          e.preventDefault();
                          return false;
                        },
                        fullWidth: true,
                        id: "passwordSubmit",
                        label: "Подтвердите пароль",
                        name: "passwordSubmit",
                        error: error.search("passwordSubmit") !== -1,
                        onChange: (e) => {
                          handleChangePassword(e);
                          unableError(e);
                        },
                        endAdornment: /* @__PURE__ */ jsxRuntimeExports.jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { onClick: handleClickShowPassword, onMouseDown: handleMouseDownPassword, edge: "end", children: showpassword ? /* @__PURE__ */ jsxRuntimeExports.jsx(VisibilityOff, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(Visibility, {}) }) })
                      }
                    )
                  ]
                }
              ) }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(SelectOrg, { error, setBackInfo: setInn }),
              config.lk.baseSnilsOrFio === "1" ? /* @__PURE__ */ jsxRuntimeExports.jsx(SelectUser, { error, inn, setBackInfo: setSnils }) : config.lk.baseSnilsOrFio === void 0 ? null : SnilsType,
              /* @__PURE__ */ jsxRuntimeExports.jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                FormControlLabel,
                {
                  style: { color: error.search("checkbox") !== -1 ? "red" : "" },
                  control: /* @__PURE__ */ jsxRuntimeExports.jsx(
                    Checkbox,
                    {
                      style: {
                        color: error.search("checkbox") !== -1 ? "red" : "#07579f"
                      },
                      checked,
                      id: "checkbox",
                      onChange: handleChangeCheckBox
                    }
                  ),
                  label: config.lk.agreeToProcessPersonalDataLink ? /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid, { children: [
                    "Я даю согласие на",
                    " ",
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      "a",
                      {
                        className: "LinkLK",
                        style: { cursor: "pointer" },
                        onClick: () => {
                          window.open(config.lk.agreeToProcessPersonalDataLink);
                        },
                        children: "обработку своих персональных данных"
                      }
                    ),
                    "."
                  ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Grid, { children: "Я согласен на обработку персональных данных (настоящим подтверждаю, что в случае регистрации мною третьих лиц, предоставляю персональные данные с их согласия)" })
                }
              ) }),
              config.lk.baseCaptcha === "0" ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}) : CapthaJSX
            ] }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(AlertDialogSlide, { setStatus, message, status, open }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              Button,
              {
                style: { backgroundColor: "#3c5b77", textTransform: "none" },
                type: "submit",
                fullWidth: true,
                variant: "contained",
                sx: { mt: 3, mb: 2 },
                disabled: isRequestLoading,
                children: "Зарегистрироваться"
              }
            ),
            /* @__PURE__ */ jsxRuntimeExports.jsx(Grid, { container: true, justifyContent: "flex-end", alignContent: "center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Grid, { item: true, sx: { alignSelf: "center" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Link, { to: WhereNavigate(), className: "LinkLK", children: "Уже есть учётная запись? Войти" }) }) })
          ] })
        ]
      }
    ),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      Dialog,
      {
        open,
        TransitionComponent: Transition,
        keepMounted: true,
        onClose: handleClose,
        "aria-describedby": "alert-dialog-slide-description",
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(DialogContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(DialogContentText, { id: "alert-dialog-slide-description", children: message }) })
      }
    )
  ] });
}
export {
  SignUp as default
};
//# sourceMappingURL=SignUp-C1Cc_mR9.js.map
