import{j as e}from"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a71.js";import{u as m}from"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a7120.js";import{s as u}from"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a7124.js";import{a as h}from"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a7135.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_28_54378c94-eda0-47d4-8f59-c666edac6a7111.js";import{V as k}from"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a7119.js";import"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a718.js";import"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a717.js";import"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a719.js";import"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a716.js";import"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a714.js";import"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a713.js";import"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a712.js";import"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a7110.js";import"./v_7_4_2_28_54378c94-eda0-47d4-8f59-c666edac6a7133.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};
