import{_ as e,j as t}from"./main.2.9.0.js";import{b}from"./react-router.DMwpH23k.js";import{y as T,a9 as A,u as p}from"./Note.NSUdvR3c.js";import{T as f}from"./TutorialLink.CFG7bS5c.js";import{m as I}from"./MondayComCommonFunc.DQtOOEq6.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.CEA_lFLo.js";function E({mondayComConf:i,setMondayComConf:u,step:l,setStep:h,loading:n,setLoading:x,isInfo:s}){const[a,g]=b.useState(!1),[j,c]=b.useState({apiToken:""}),k=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),h(2)},m=v=>{const{name:d,value:N}=v.target;c(o=>p(o,r=>{r[d]=""})),u(o=>p(o,r=>{r[d]=N}))},y=`
    <h4>${e("To Get Monday.com API Token","bit-integrations")}</h4>
    <ul>
      <li>${e("Log in to your Monday.com account.","bit-integrations")}</li>
      <li>${e("Click on your avatar in the bottom left corner.","bit-integrations")}</li>
      <li>${e("Select Developers → API Token.","bit-integrations")}</li>
      <li>${e("Copy your personal API token (v2).","bit-integrations")}</li>
    </ul>`;return t.jsxs("div",{className:"btcd-stp-page",style:{width:l===1&&900,height:l===1&&"auto"},children:[t.jsx(f,{linkKey:"mondayCom"}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:e("Integration Name:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:m,name:"name",value:i.name,type:"text",placeholder:e("Integration Name...","bit-integrations"),disabled:s}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:e("API Token:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:m,name:"apiToken",value:i.apiToken,type:"text",placeholder:e("API Token...","bit-integrations"),disabled:s}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:j.apiToken}),t.jsxs("small",{className:"d-blk mt-3",children:[e("To Get API Token, Please Visit","bit-integrations")," ",t.jsx("a",{className:"btcd-link",href:"https://monday.com/developers/apps",target:"_blank",rel:"noreferrer",children:e("Monday.com Developers","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),!s&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>I(i,c,g,n,x),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:a||n.auth,children:[a?e("Authorized ✔","bit-integrations"):e("Authorize","bit-integrations"),n.auth&&t.jsx(T,{size:"20",clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:k,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!a,children:[e("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),t.jsx(A,{note:y})]})}export{E as default};
