import { j as e } from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f775.js";
import { r as l } from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f77.js";
import {
  u as h,
  g as _,
  b as N,
  l as w,
} from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f774.js";
import {
  m as C,
  s as L,
  H as P,
} from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7723.js";
import {
  i as B,
  g as T,
} from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7722.js";
import { u as E } from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f77164.js";
import {
  _ as x,
  S as g,
  o as H,
  aV as A,
  aW as I,
  s as z,
  q as F,
  r as M,
} from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f777.js";
import { B as R } from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7775.js";
import { b as S } from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7766.js";
import { e as O } from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f77152.js";
import { o as V } from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7744.js";
import { u as m } from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7747.js";
import { V as D } from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f772.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f773.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f779.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7710.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7720.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f778.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7746.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f776.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7748.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7711.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7729.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7735.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7736.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7737.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7738.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7739.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7724.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7734.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7731.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7730.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7727.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7726.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7725.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7728.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7732.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f77107.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f77156.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f77105.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f77126.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f77106.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7760.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f77108.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f77109.js";
import "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f77110.js";
function U() {
  const { idioma: s, setIdioma: n } = h(),
    t = (r) => {
      (n(r), chrome.runtime.sendMessage({ action: "languageReload", lang: r }));
    };
  return e.jsxs("select", {
    className: "select pt-0 select-bordered select-sm w-fit max-w-xs shadow-sm",
    value: s,
    onChange: (r) => {
      t(r.target.value);
    },
    id: "select-language",
    children: [
      e.jsx("option", { value: "pt", children: "Português" }),
      e.jsx("option", { value: "es", children: "Español" }),
      e.jsx("option", { value: "en", children: "English" }),
    ],
  });
}
const W = l.lazy(() =>
  __vitePreload(
    () =>
      import(
        chrome.runtime.getURL(
          "content/assets/js/v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f77161.js",
        )
      ),
    [],
  ),
);
function q() {
  return e.jsx(l.Suspense, {
    fallback: e.jsx(e.Fragment, {}),
    children: e.jsx(W, {}),
  });
}
const G = l.lazy(() =>
  __vitePreload(
    () =>
      import(
        chrome.runtime.getURL(
          "content/assets/js/v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f77162.js",
        )
      ),
    [],
  ),
);
function J() {
  return e.jsx(l.Suspense, {
    fallback: e.jsx(e.Fragment, {}),
    children: e.jsx(G, {}),
  });
}
const K = l.lazy(() =>
  __vitePreload(
    () =>
      import(
        chrome.runtime.getURL(
          "content/assets/js/v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f77163.js",
        )
      ),
    [],
  ),
);
function Q() {
  return e.jsx(l.Suspense, {
    fallback: e.jsx(e.Fragment, {}),
    children: e.jsx(K, {}),
  });
}
function X() {
  const { privacityOptions: s, setPrivacityOptions: n } = B(),
    { language: t } = h(),
    c = (i) => {
      n({ ...s, [i]: { hide: !s[i].hide } });
    },
    r = [
      { tag: "photoHidden", nome: t.ocutar_foto, checked: s.photoHidden.hide },
      { tag: "nameHidden", nome: t.ocutar_nome, checked: s.nameHidden.hide },
      { tag: "midiaHidden", nome: t.ocutar_midia, checked: s.midiaHidden.hide },
      {
        tag: "galeryHidden",
        nome: t.ocutar_galeria,
        checked: s.galeryHidden.hide,
      },
      {
        tag: "lastMessageHidden",
        nome: t.ocutar_mensagem,
        checked: s.lastMessageHidden.hide,
      },
      {
        tag: "messageHidden",
        nome: t.ocutar_chat,
        checked: s.messageHidden.hide,
      },
    ];
  return e.jsx(e.Fragment, {
    children: r.map((i, d) =>
      e.jsx(
        "label",
        {
          htmlFor: i.tag,
          children: e.jsxs("div", {
            className:
              "flex justify-between cursor-pointer items-center h-9 py-2 rounded-lg hover:bg-[var(--dropdown-background-hover)] px-2",
            children: [
              e.jsx("span", { children: i.nome }),
              e.jsx(g, {
                id: i.tag,
                switchUpdate: () => {
                  c(i.tag);
                },
                estado: i.checked,
              }),
            ],
          }),
        },
        d,
      ),
    ),
  });
}
const o =
  "flex justify-between cursor-pointer items-center h-9 py-2 rounded-lg hover:bg-[var(--dropdown-background-hover)] px-2";
function We() {
  const s = h((a) => a.language),
    n = T((a) => a.close),
    t = E((a) => a.extractFile),
    { open: c, openRendertype: r } = C(
      m((a) => ({ open: a.open, openRendertype: a.openRendertype })),
    ),
    { tema: j, setTema: i } = L(
      m((a) => ({ tema: a.tema, setTema: a.setTema })),
    ),
    { theme: d, setTheme: v } = _(
      m((a) => ({ theme: a.theme, setTheme: a.setTheme })),
    ),
    {
      session: p,
      user: f,
      logout: b,
    } = N(m((a) => ({ session: a.session, user: a.user, logout: a.logout }))),
    k = w(),
    [u, y] = l.useState(!1);
  return e.jsxs("div", {
    children: [
      e.jsx(H, { children: s.configAgendamento_title }),
      e.jsxs("div", {
        className: "pt-2 flex flex-col gap-2 overflow-auto",
        style: { maxHeight: "calc(100vh - 70px)" },
        children: [
          e.jsx("label", {
            htmlFor: "select-language",
            children: e.jsxs("div", {
              className: o,
              children: [e.jsx("span", { children: s.idioma }), e.jsx(U, {})],
            }),
          }),
          e.jsx("label", {
            htmlFor: "handleTheme",
            children: e.jsxs("div", {
              className: o,
              children: [
                e.jsx("span", { children: s.tema }),
                e.jsx(g, {
                  estado: d,
                  switchUpdate: () => v(!d),
                  id: "handleTheme",
                }),
              ],
            }),
          }),
          e.jsx("label", {
            htmlFor: "handleMenuTheme",
            children: e.jsxs("div", {
              className: o,
              children: [
                e.jsx("span", { children: s.tema_menu }),
                e.jsxs("select", {
                  className:
                    "select pt-0 select-bordered select-sm w-fit max-w-xs shadow-sm",
                  value: j,
                  onChange: (a) => {
                    i(a.target.value);
                  },
                  id: "handleMenuTheme",
                  children: [
                    e.jsx("option", { value: "default", children: s.default }),
                    e.jsx("option", { value: "dark", children: s.dark }),
                    e.jsx("option", {
                      value: "original",
                      children: s.original,
                    }),
                    e.jsx("option", { value: "whats", children: s.whats }),
                    e.jsx("option", { value: "prime", children: s.prime }),
                    e.jsx("option", { value: "dim", children: s.dim }),
                  ],
                }),
              ],
            }),
          }),
        //   e.jsx("div", {
        //     onClick: V,
        //     className: o,
        //     children: e.jsx("span", { children: s.painel_Gestor }),
        //   }),
          e.jsxs("div", {
            onClick: () => y(!u),
            className: o,
            children: [
              e.jsx("span", { children: s.privacidade }),
              e.jsx("span", {
                className: "w-fit",
                children: u
                  ? e.jsx(A, { className: "w-6 h-6" })
                  : e.jsx(I, { className: "w-6 h-6" }),
              }),
            ],
          }),
          u && e.jsx(X, {}),
          e.jsx("div", {
            onClick: () => {
              (n(), c(e.jsx(J, {})));
            },
            className: o,
            children: e.jsx("span", { children: s.backup }),
          }),
          e.jsx("label", {
            htmlFor: "jsonInput",
            children: e.jsxs("div", {
              className: o,
              children: [
                e.jsx("span", { children: s.import_backup }),
                e.jsx("input", {
                  type: "file",
                  accept: ".json",
                  id: "jsonInput",
                  className: "hidden",
                  onChange: (a) => {
                    (t(a.target.files[0]), n(), c(e.jsx(Q, {})));
                  },
                }),
              ],
            }),
          }),
          e.jsx("div", {
            onClick: () => {
              (n(), c(e.jsx(q, {})));
            },
            className: o,
            children: e.jsx("span", { children: s.backupAutomatico }),
          }),
          e.jsx("div", {
            onClick: () => {
              (n(), c(e.jsx(P, {}), !0));
            },
            className: o,
            children: e.jsx("span", { children: s.assistenteIA }),
          }),
          e.jsx("div", {
            onClick: () => O(!0),
            className: o,
            children: e.jsx("span", { children: s.exportarTodosPerfis }),
          }),
          e.jsxs("div", {
            className: "flex justify-between",
            children: [
              e.jsx("span", { className: "m-auto", children: e.jsx(R, {}) }),
              p.is_premium &&
                e.jsx("span", {
                  className: "m-auto",
                  children: e.jsx(z, {
                    type: "default",
                    btnPremium: s.btnPremiumLogado,
                    checkout: k,
                    webhook: S,
                  }),
                }),
            ],
          }),
          e.jsx("div", {
            className: "flex items-center justify-center gap-4 pb-4 pt-4",
            children: p.is_auth
              ? e.jsx(F, { name: s.deslogar, funcao: b })
              : e.jsx(M, { name: s.logar, funcao: () => r("login") }),
          }),
        ],
      }),
      e.jsx("div", {
        className: "absolute bottom-0 mb-[7px]",
        style: { width: "calc(100% - 30px)" },
        children: e.jsxs("div", {
          className: "flex justify-between",
          children: [
            p.is_auth &&
              e.jsx("kbd", {
                className: "kbd kbd-sm mb-1 rounded",
                children: f.email,
              }),
            e.jsxs("kbd", {
              className: "kbd kbd-sm mb-1  rounded",
              children: [s.version, " ", D.version],
            }),
          ],
        }),
      }),
    ],
  });
}
export { We as default };
