import{j as e,X as u,bg as x,a1 as n,bn as g,bh as f,a2 as j,a4 as b,ao as v,I as l}from"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b710.js";import{u as w}from"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b719.js";import{s as k}from"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b723.js";import{a as y}from"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b734.js";import{V as A}from"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b718.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b74.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b7.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b78.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b75.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b77.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b76.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b79.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b72.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b73.js";import"./v_7_4_2_16_364f475f-21c1-4d89-bf17-70efc8c405b732.js";function q(){var a,p;const{language:o}=w(),{active:c,toggleSwitch:d,token:t,getToken:m}=y(),s=k(i=>i.label),h=()=>{const i=A.webSocket["api-whatsapp"]+"/api-docs";window.open(i,"_blank")},r=()=>{t?(v(t),l({type:"Success",message:o.tokenCopied,position:"top-right"})):l({type:"Error",message:o.tokenIsEmpty,position:"top-right"})};return e.jsxs("div",{className:"grid gap-6 !w-[550px]",children:[e.jsxs("div",{className:"pb-2",children:[e.jsxs("div",{className:"flex gap-3 items-center",children:[e.jsx(u,{children:o.configAPI}),((p=(a=s.videos_tutoriais)==null?void 0:a.api)==null?void 0:p.length)>0&&e.jsx(x,{funcao:()=>window.open(s.videos_tutoriais.api,"_blank")})]}),e.jsx(n,{children:o.ApiDesc})]}),e.jsxs("div",{className:"w-full flex gap-1 items-center",style:{maxHeight:"2rem"},children:[e.jsx("div",{className:"!w-4/5 lg:tooltip lg:tooltip-top cursor-pointer","data-tip":"Clique para copiar o token",onClick:()=>r(),children:e.jsx("input",{type:"text",placeholder:o.APIinputPlace,value:t,className:"input input-bordered !w-full input-sm pointer-events-none",readOnly:!0})}),e.jsxs("div",{onClick:()=>m(),className:"flex items-center justify-center gap-0.5 h-full text-sm w-min whitespace-nowrap px-2 border border-[var(--primaria)] border-solid rounded-lg pulse hover:text-[var(--primaria)] cursor-pointer",children:[e.jsx("p",{children:o.APIGerarToken}),e.jsx(g,{})]}),e.jsx("div",{onClick:()=>r(),className:"p-2 lg:tooltip lg:tooltip-left gap-0.5 h-full text-sm border border-[var(--primaria)] border-solid rounded-lg pulse hover:text-[var(--primaria)] cursor-pointer","data-tip":"Copiar Token",children:e.jsx(f,{})})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"toggle",className:"flex justify-between cursor-pointer mb-1.5 items-center hover:bg-[var(--dropdown-background-hover)] h-9 px-1 py-2 rounded",children:[e.jsx(n,{children:o.APISwitch}),e.jsx(j,{estado:c,switchUpdate:()=>d(),id:"toggle"})]}),e.jsx("div",{className:"flex",children:e.jsx(b,{name:o.APIOpenDoc,funcao:h})})]})]})}export{q as default};
