import{j as e}from"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc.js";import{u as m}from"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc20.js";import{s as u}from"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc24.js";import{a as h}from"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc35.js";import{Q as x,be as g,$ as a,bl as f,bf as j,a0 as b,a2 as v,k as w,I as p}from"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc11.js";import{V as k}from"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc19.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc8.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc7.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc9.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc6.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc4.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc3.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc2.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc10.js";import"./v_7_4_2_27_fac7f92f-33f6-4d26-8a6f-b87b9638d3cc33.js";function O(){const{language:o}=m(),{active:n,toggleSwitch:l,token:t,getToken:c}=h(),s=u(i=>i.label),d=()=>{const i=k.webSocket["api-whatsapp"]+"/api-docs";window.open(i,"_blank")},r=()=>{t?(w(t),p({type:"Success",message:o.tokenCopied,position:"top-right"})):p({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(x,{children:o.configAPI}),s.videos_tutoriais?.api?.length>0&&e.jsx(g,{funcao:()=>window.open(s.videos_tutoriais.api,"_blank")})]}),e.jsx(a,{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:()=>c(),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(f,{})]}),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(j,{})})]}),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(a,{children:o.APISwitch}),e.jsx(b,{estado:n,switchUpdate:()=>l(),id:"toggle"})]}),e.jsx("div",{className:"flex",children:e.jsx(v,{name:o.APIOpenDoc,funcao:d})})]})]})}export{O as default};
