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_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab710.js";import{u as w}from"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab719.js";import{q as k}from"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab723.js";import{a as y}from"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab735.js";import{V as A}from"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab718.js";import"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab78.js";import"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab74.js";import"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab7.js";import"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab75.js";import"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab77.js";import"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab76.js";import"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab79.js";import"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab72.js";import"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab73.js";import"./v_7_4_2_13_59773d94-6a68-4ed1-8b86-dcf9791b0ab733.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="https://etivi.com/docs/api-etivibot/";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};
