import{j as e,V as h,b6 as x,$ as n,bb as g,b7 as b,a0 as f,a2 as j,ak as v,I as l}from"./v_7_4_2_12_5cc5c70e-17b9-46d5-a61c-750829962ec510.js";import{u as w}from"./v_7_4_2_12_5cc5c70e-17b9-46d5-a61c-750829962ec519.js";import{q as k}from"./v_7_4_2_12_5cc5c70e-17b9-46d5-a61c-750829962ec523.js";import{a as y}from"./v_7_4_2_12_5cc5c70e-17b9-46d5-a61c-750829962ec535.js";import{V as A}from"./v_7_4_2_12_5cc5c70e-17b9-46d5-a61c-750829962ec518.js";import"./v_7_4_2_12_5cc5c70e-17b9-46d5-a61c-750829962ec58.js";import"./v_7_4_2_12_5cc5c70e-17b9-46d5-a61c-750829962ec54.js";import"./v_7_4_2_12_5cc5c70e-17b9-46d5-a61c-750829962ec5.js";import"./v_7_4_2_12_5cc5c70e-17b9-46d5-a61c-750829962ec55.js";import"./v_7_4_2_12_5cc5c70e-17b9-46d5-a61c-750829962ec57.js";import"./v_7_4_2_12_5cc5c70e-17b9-46d5-a61c-750829962ec56.js";import"./v_7_4_2_12_5cc5c70e-17b9-46d5-a61c-750829962ec59.js";import"./v_7_4_2_12_5cc5c70e-17b9-46d5-a61c-750829962ec52.js";import"./v_7_4_2_12_5cc5c70e-17b9-46d5-a61c-750829962ec53.js";import"./v_7_4_2_12_5cc5c70e-17b9-46d5-a61c-750829962ec533.js";function O(){var a,p;const{language:t}=w(),{active:c,toggleSwitch:d,token:o,getToken:m}=y(),s=k(i=>i.label),u=()=>{const i=A.webSocket["api-whatsapp"]+"/api-docs";window.open(i,"_blank")},r=()=>{o?(v(o),l({type:"Success",message:t.tokenCopied,position:"top-right"})):l({type:"Error",message:t.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(h,{children:t.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:t.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:t.APIinputPlace,value:o,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:t.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(b,{})})]}),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:t.APISwitch}),e.jsx(f,{estado:c,switchUpdate:()=>d(),id:"toggle"})]}),e.jsx("div",{className:"flex",children:e.jsx(j,{name:t.APIOpenDoc,funcao:u})})]})]})}export{O as default};
