import{j as e,Y as u,bh as x,a2 as n,bo as g,bi as f,a3 as j,a5 as b,l as v,I as l}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d610.js";import{u as w}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d619.js";import{s as k}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d623.js";import{a as y}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d634.js";import{V as A}from"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d618.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d64.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d6.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d68.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d65.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d67.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d66.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d69.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d62.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d63.js";import"./v_7_4_2_23_80f0be4c-2624-48ff-84de-a733d033e3d632.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};
