import{j as e,y as d,H as i,ba as m,b6 as h,J as x,Q as u,ac as g,I as s}from"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b10.js";import{u as j}from"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b19.js";import{a as f}from"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b34.js";import{V as v}from"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b18.js";import"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b8.js";import"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b4.js";import"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b.js";import"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b5.js";import"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b7.js";import"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b9.js";import"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b32.js";import"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b23.js";import"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b6.js";import"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b2.js";import"./v_7_4_1_31_281d2484-5da9-48a8-8939-2c37d755bb5b3.js";function R(){const{language:o}=j(),{active:a,toggleSwitch:p,token:t,getToken:n}=f(),l=()=>{const c=v.webSocket["api-whatsapp"]+"/api-docs";window.open(c,"_blank")},r=()=>{t?(g(t),s({type:"Success",message:o.tokenCopied,position:"top-right"})):s({type:"Error",message:o.tokenIsEmpty,position:"top-right"})};return e.jsxs("div",{className:"grid gap-6 !w-[550px]",children:[e.jsxs("div",{children:[e.jsx(d,{children:o.configAPI}),e.jsx(i,{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:()=>n(),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(m,{})]}),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(h,{})})]}),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(i,{children:o.APISwitch}),e.jsx(x,{estado:a,switchUpdate:()=>p(),id:"toggle"})]}),e.jsx("div",{className:"flex",children:e.jsx(u,{name:o.APIOpenDoc,funcao:l})})]})]})}export{R as default};
