import{j as e,y as d,H as i,b8 as m,b4 as h,J as x,Q as u,ac as g,I as s}from"./v_7_4_1_21_73d2acb1-b7f3-47a2-a8fe-3772b225080910.js";import{u as j}from"./v_7_4_1_21_73d2acb1-b7f3-47a2-a8fe-3772b225080919.js";import{a as f}from"./v_7_4_1_21_73d2acb1-b7f3-47a2-a8fe-3772b225080934.js";import{V as v}from"./v_7_4_1_21_73d2acb1-b7f3-47a2-a8fe-3772b225080918.js";import"./v_7_4_1_21_73d2acb1-b7f3-47a2-a8fe-3772b22508098.js";import"./v_7_4_1_21_73d2acb1-b7f3-47a2-a8fe-3772b22508094.js";import"./v_7_4_1_21_73d2acb1-b7f3-47a2-a8fe-3772b2250809.js";import"./v_7_4_1_21_73d2acb1-b7f3-47a2-a8fe-3772b22508095.js";import"./v_7_4_1_21_73d2acb1-b7f3-47a2-a8fe-3772b22508097.js";import"./v_7_4_1_21_73d2acb1-b7f3-47a2-a8fe-3772b22508099.js";import"./v_7_4_1_21_73d2acb1-b7f3-47a2-a8fe-3772b225080932.js";import"./v_7_4_1_21_73d2acb1-b7f3-47a2-a8fe-3772b225080923.js";import"./v_7_4_1_21_73d2acb1-b7f3-47a2-a8fe-3772b22508096.js";import"./v_7_4_1_21_73d2acb1-b7f3-47a2-a8fe-3772b22508092.js";import"./v_7_4_1_21_73d2acb1-b7f3-47a2-a8fe-3772b22508093.js";function R(){const{language:o}=j(),{active:a,toggleSwitch:p,token:t,getToken:n}=f(),l=()=>{const c=v.webSocket["api-whatsapp"]+"/api-docs";window.open(c,"_blank")},r=()=>{t?(g(t),s({type:"Success",message:o.tokenCopied,position:"top-right"})):s({type:"Error",message:o.tokenIsEmpty,position:"top-right"})};return e.jsxs("div",{className:"grid gap-6 !w-[550px]",children:[e.jsxs("div",{children:[e.jsx(d,{children:o.configAPI}),e.jsx(i,{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:()=>n(),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(m,{})]}),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(h,{})})]}),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(i,{children:o.APISwitch}),e.jsx(x,{estado:a,switchUpdate:()=>p(),id:"toggle"})]}),e.jsx("div",{className:"flex",children:e.jsx(u,{name:o.APIOpenDoc,funcao:l})})]})]})}export{R as default};
