import{j as e,X as u,bg as x,a1 as n,bn as g,bh as f,a2 as j,a4 as b,ao as v,I as l}from"./v_7_4_2_19_142f09de-58e9-4005-bc9b-6e38dd94578110.js";import{u as w}from"./v_7_4_2_19_142f09de-58e9-4005-bc9b-6e38dd94578119.js";import{s as k}from"./v_7_4_2_19_142f09de-58e9-4005-bc9b-6e38dd94578123.js";import{a as y}from"./v_7_4_2_19_142f09de-58e9-4005-bc9b-6e38dd94578134.js";import{V as A}from"./v_7_4_2_19_142f09de-58e9-4005-bc9b-6e38dd94578118.js";import"./v_7_4_2_19_142f09de-58e9-4005-bc9b-6e38dd9457814.js";import"./v_7_4_2_19_142f09de-58e9-4005-bc9b-6e38dd945781.js";import"./v_7_4_2_19_142f09de-58e9-4005-bc9b-6e38dd9457818.js";import"./v_7_4_2_19_142f09de-58e9-4005-bc9b-6e38dd9457815.js";import"./v_7_4_2_19_142f09de-58e9-4005-bc9b-6e38dd9457817.js";import"./v_7_4_2_19_142f09de-58e9-4005-bc9b-6e38dd9457816.js";import"./v_7_4_2_19_142f09de-58e9-4005-bc9b-6e38dd9457819.js";import"./v_7_4_2_19_142f09de-58e9-4005-bc9b-6e38dd9457812.js";import"./v_7_4_2_19_142f09de-58e9-4005-bc9b-6e38dd9457813.js";import"./v_7_4_2_19_142f09de-58e9-4005-bc9b-6e38dd94578132.js";function q(){var a,p;const{language:o}=w(),{active:c,toggleSwitch:d,token:t,getToken:m}=y(),s=k(i=>i.label),h=()=>{const i="https://etivi.com/docs/api-etivibot/";window.open(i,"_blank")},r=()=>{t?(v(t),l({type:"Success",message:o.tokenCopied,position:"top-right"})):l({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(u,{children:o.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: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:()=>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:o.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(f,{})})]}),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:o.APISwitch}),e.jsx(j,{estado:c,switchUpdate:()=>d(),id:"toggle"})]}),e.jsx("div",{className:"flex",children:e.jsx(b,{name:o.APIOpenDoc,funcao:h})})]})]})}export{q as default};
