import {
  j as a,
  m as t,
} from "./v_7_4_3_73_d3c9bac7-c74e-47f6-ac42-499f067843a53.js";
import { a as x } from "./v_7_4_3_73_d3c9bac7-c74e-47f6-ac42-499f067843a52.js";
import { q as y } from "./v_7_4_3_73_d3c9bac7-c74e-47f6-ac42-499f067843a525.js";
import {
  u as b,
  W as f,
} from "./v_7_4_3_73_d3c9bac7-c74e-47f6-ac42-499f067843a54.js";
import "./v_7_4_3_73_d3c9bac7-c74e-47f6-ac42-499f067843a55.js";
import {
  t as j,
  f as w,
  u as N,
} from "./v_7_4_3_73_d3c9bac7-c74e-47f6-ac42-499f067843a57.js";
import "./v_7_4_3_73_d3c9bac7-c74e-47f6-ac42-499f067843a56.js";
import "./v_7_4_3_73_d3c9bac7-c74e-47f6-ac42-499f067843a58.js";
import "./v_7_4_3_73_d3c9bac7-c74e-47f6-ac42-499f067843a5.js";
import "./v_7_4_3_73_d3c9bac7-c74e-47f6-ac42-499f067843a59.js";
import "./v_7_4_3_73_d3c9bac7-c74e-47f6-ac42-499f067843a510.js";
import "./v_7_4_3_73_d3c9bac7-c74e-47f6-ac42-499f067843a520.js";
const k = (r) => ({
  email: (s) => {
    const l = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
    return s ? (l.test(s) ? "" : r.emailInvalido) : r.emailObrigatorio;
  },
});
function O() {
  const { language: r } = b(),
    { close: s, openRendertype: l } = y(),
    [o, g] = x.useState({
      email: "",
      segmentoAtuacao: "",
      numeroFuncionarios: "",
    }),
    p = k(r),
    [n, h] = x.useState(""),
    d = (e, m) => {
      const u = e === "email" ? m.replace(/\s/g, "") : m;
      if ((g((c) => ({ ...c, [e]: u })), e === "email")) {
        const c = p.email(u);
        h(c);
      }
    },
    i = o.email.trim() !== "" && n === "",
    v = () => {
      i &&
        (s(),
        f("modalLead", o),
        l("Modelo_Selecao", !1),
        chrome.storage.local.set({ initSystem: !0 }));
    };
  return a.jsxs("div", {
    className:
      "w-[100vw] max-w-[700px] max-h-[90vh] bg-white dark:bg-gray-900 rounded-xl overflow-y-auto",
    children: [
      a.jsxs("div", {
        className:
          "bg-gradient-to-r from-[var(--primaria)] to-[var(--secundaria)] p-8 text-white relative overflow-hidden",
        children: [
          a.jsx("div", { className: "absolute inset-0 bg-black/10" }),
          a.jsx("div", {
            className:
              "absolute top-0 right-0 w-32 h-32 bg-white/10 rounded-full -translate-y-16 translate-x-16",
          }),
          a.jsx("div", {
            className:
              "absolute bottom-0 left-0 w-24 h-24 bg-white/10 rounded-full translate-y-12 -translate-x-12",
          }),
          a.jsxs("div", {
            className: "relative text-center",
            children: [
              a.jsx(t.h2, {
                className: "text-3xl font-bold mb-2",
                initial: { opacity: 0, y: -20 },
                animate: { opacity: 1, y: 0 },
                transition: { delay: 0.2 },
                children: r.bemVindo,
              }),
              a.jsx(t.p, {
                className: "text-white/90 text-lg",
                initial: { opacity: 0, y: -10 },
                animate: { opacity: 1, y: 0 },
                transition: { delay: 0.3 },
                children: r.informeSeuEmail,
              }),
            ],
          }),
        ],
      }),
      a.jsx("div", {
        className: "p-8 h-full overflow-y-auto bg-gray-50 dark:bg-gray-800",
        children: a.jsxs(t.div, {
          initial: { opacity: 0, y: 20 },
          animate: { opacity: 1, y: 0 },
          transition: { delay: 0.1 },
          className: "space-y-6",
          children: [
            a.jsxs("div", {
              className: "grid grid-cols-1 md:grid-cols-2 gap-6",
              children: [
                a.jsxs("div", {
                  className: "space-y-3",
                  children: [
                    a.jsxs("label", {
                      className:
                        "text-sm font-semibold text-gray-700 dark:text-gray-200 flex items-center gap-2",
                      children: [
                        a.jsx("div", {
                          className: "p-1 bg-[var(--primaria)]/10 rounded-md",
                          children: a.jsx(j, {
                            size: 16,
                            className: "text-[var(--primaria)]",
                          }),
                        }),
                        r.segmentoAtuacao,
                      ],
                    }),
                    a.jsxs("select", {
                      id: "segment",
                      value: o.segmentoAtuacao,
                      onChange: (e) => d("segmentoAtuacao", e.target.value),
                      className:
                        "w-full p-4 border border-gray-200 dark:border-gray-600 rounded-xl bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-[var(--primaria)] focus:border-transparent transition-all duration-200 placeholder-gray-400 dark:placeholder-gray-400",
                      children: [
                        a.jsx("option", {
                          disabled: !0,
                          value: "",
                          children: "Selecione...",
                        }),
                        a.jsx("option", {
                          value: "Academia",
                          children: "Academia",
                        }),
                        a.jsx("option", {
                          value: "Advocacia",
                          children: "Advocacia",
                        }),
                        a.jsx("option", {
                          value: "Clínica Médica/Estética",
                          children: "Clínica Médica/Estética",
                        }),
                        a.jsx("option", {
                          value: "Comércio",
                          children: "Comércio",
                        }),
                        a.jsx("option", {
                          value: "Consórcio",
                          children: "Consórcio",
                        }),
                        a.jsx("option", {
                          value: "Imobiliário",
                          children: "Imobiliário",
                        }),
                        a.jsx("option", {
                          value: "Marketing",
                          children: "Marketing",
                        }),
                        a.jsx("option", {
                          value: "Seguros",
                          children: "Seguros",
                        }),
                        a.jsx("option", {
                          value: "Serviços em Geral",
                          children: "Serviços em Geral",
                        }),
                        a.jsx("option", {
                          value: "Outros",
                          children: "Outros",
                        }),
                      ],
                    }),
                  ],
                }),
                a.jsxs("div", {
                  className: "space-y-3",
                  children: [
                    a.jsxs("label", {
                      className:
                        "text-sm font-semibold text-gray-700 dark:text-gray-200 flex items-center gap-2",
                      children: [
                        a.jsx("div", {
                          className: "p-1 bg-[var(--primaria)]/10 rounded-md",
                          children: a.jsx(w, {
                            size: 16,
                            className: "text-[var(--primaria)]",
                          }),
                        }),
                        "Número de Funcionários",
                      ],
                    }),
                    a.jsxs("select", {
                      id: "func",
                      value: o.numeroFuncionarios,
                      onChange: (e) => d("numeroFuncionarios", e.target.value),
                      className:
                        "w-full p-4 border border-gray-200 dark:border-gray-600 rounded-xl bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-[var(--primaria)] focus:border-transparent transition-all duration-200",
                      children: [
                        a.jsx("option", {
                          disabled: !0,
                          value: "",
                          children: "Selecione...",
                        }),
                        a.jsx("option", { value: "1", children: "1" }),
                        a.jsx("option", { value: "2", children: "2" }),
                        a.jsx("option", { value: "3", children: "3" }),
                        a.jsx("option", { value: "4", children: "4" }),
                        a.jsx("option", { value: "5", children: "5" }),
                        a.jsx("option", { value: "6+", children: "6+" }),
                      ],
                    }),
                  ],
                }),
              ],
            }),
            a.jsxs("div", {
              className: "space-y-3",
              children: [
                a.jsxs("label", {
                  className:
                    "text-sm font-semibold text-gray-700 dark:text-gray-200 flex items-center gap-2",
                  children: [
                    a.jsx("div", {
                      className: "p-1 rounded-md",
                      children: a.jsx(N, {
                        size: 16,
                        className: "text-[var(--primaria)]",
                      }),
                    }),
                    r.Email,
                    " *",
                  ],
                }),
                a.jsx("input", {
                  type: "email",
                  value: o.email,
                  onChange: (e) => d("email", e.target.value),
                  onKeyDown: (e) => {
                    e.key === " " && e.preventDefault();
                  },
                  className: `w-full p-4 border ${n ? "border-red-500" : "border-gray-200 dark:border-gray-600"} rounded-xl bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-[var(--primaria)] focus:border-transparent transition-all duration-200 placeholder-gray-400 dark:placeholder-gray-400`,
                  placeholder: "Ex: email@email.com",
                  required: !0,
                }),
                n &&
                  a.jsx("span", {
                    className: "pt-2 text-red-500 text-md font-semibold",
                    children: n,
                  }),
              ],
            }),
            a.jsxs(t.div, {
              className:
                "flex justify-between pt-8 border-t border-gray-200 dark:border-gray-600",
              initial: { opacity: 0 },
              animate: { opacity: 1 },
              transition: { delay: 0.4 },
              children: [
                a.jsx(t.button, {
                  onClick: () => {
                    (chrome.storage.local.set({ initSystem: !0 }),
                      l("login", !1));
                  },
                  className:
                    "px-10 py-4 rounded-xl font-semibold text-lg transition-all duration-200 bg-gradient-to-r from-[var(--primaria)] to-[var(--secundaria)] text-white hover:shadow-lg hover:shadow-[var(--primaria)]/25 transform hover:-translate-y-0.5",
                  whileHover: i ? { scale: 1.02 } : {},
                  whileTap: i ? { scale: 0.98 } : {},
                  children: "Realizar Login",
                }),
                a.jsx(t.button, {
                  onClick: () => {
                    v();
                  },
                  disabled: !i,
                  className: `px-10 py-4 rounded-xl font-semibold text-lg transition-all duration-200 ${i ? "bg-gradient-to-r from-[var(--primaria)] to-[var(--secundaria)] text-white hover:shadow-lg hover:shadow-[var(--primaria)]/25 transform hover:-translate-y-0.5" : "bg-gray-200 dark:bg-gray-600 text-gray-400 dark:text-gray-500 cursor-not-allowed"}`,
                  whileHover: i ? { scale: 1.02 } : {},
                  whileTap: i ? { scale: 0.98 } : {},
                  children: r.ativarTeste,
                }),
              ],
            }),
          ],
        }),
      }),
    ],
  });
}
export { O as default };
