var P=Object.defineProperty;var x=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var g=(t,s,a)=>s in t?P(t,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[s]=a,p=(t,s)=>{for(var a in s||(s={}))z.call(s,a)&&g(t,a,s[a]);if(x)for(var a of x(s))S.call(s,a)&&g(t,a,s[a]);return t};import{_ as i,j as e}from"./main.2.8.1.js";import{d as j}from"./react-router-dom.9mCuUg3q.js";import{z as I,a9 as T}from"./Note.BeM7sN-p.js";import{s as f}from"./SmailyCommonFunc.6Jmchv5r.js";import{t as L}from"./tutorialLinks.kMkIDzcD.js";import{T as w}from"./TutorialLink.BAFX--T3.js";import"./CopyIcn.3gZpHton.js";function V({smailyConf:t,setSmailyConf:s,step:a,setStep:_,loading:l,setLoading:N,isInfo:r}){const[c,k]=j.useState(!1),[o,u]=j.useState({name:"",subdomain:"",api_user_name:"",api_user_password:""}),{smaily:n}=L,v=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),t!=null&&t.default,_(2)},d=m=>{const b=p({},t),h=p({},o);h[m.target.name]="",b[m.target.name]=m.target.value,u(h),s(b)},A=`<h4>${i("To create API username and password, do the following.","bit-integrations")}</h4>
  <ol>
  <li>${i("Click on your","bit-integrations")} <a href="https://www.sendsmaily.net/account/login/" target="_blank">account</a>${i("name in the upper right corner of the page.","bit-integrations")}</li>
  <li>${i("From a dropdown menu choose “Preferences”.","bit-integrations")}</li>
  <li>${i("Click on the “Integrations” tab.","bit-integrations")}</li>
  <li>${i("And then underneath API Passwords click on “Create a new user”.","bit-integrations")}</li>
  </ol>`;return e.jsxs("div",{className:"btcd-stp-page",style:{width:a===1&&900,height:a===1&&"auto"},children:[e.jsx(w,{title:"Smaily",youTubeLink:n==null?void 0:n.youTubeLink}),e.jsx(w,{title:"Smaily",docLink:n==null?void 0:n.docLink}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:i("Integration Name:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:d,name:"name",value:t.name,type:"text",placeholder:i("Integration Name...","bit-integrations"),disabled:r}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:o.name}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:i("Subdomain Name:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:d,name:"subdomain",value:t.subdomain,type:"text",placeholder:i("Your Account","bit-integrations"),disabled:r}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:o.subdomain}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:i("API User Name:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:d,name:"api_user_name",value:t.api_user_name,type:"text",placeholder:i("API user name...","bit-integrations"),disabled:r}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:o.api_user_name}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:i("API User Password:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:d,name:"api_user_password",value:t.api_user_password,type:"text",placeholder:i("API user password...","bit-integrations"),disabled:r}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:o.api_user_password}),t.subdomain&&e.jsxs("small",{className:"d-blk mt-3",children:[i("To Get subdomain, API user name and password Please Visit","bit-integrations")," ",e.jsx("a",{className:"btcd-link",href:`https://${t.subdomain}.sendsmaily.net/account/profile/#api`,target:"_blank",rel:"noreferrer",children:i("Smaily API Token","bit-integrations")})]}),e.jsx("br",{}),e.jsx("br",{}),!r&&e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>f(t,s,u,k,l,N),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:c||l.auth,children:[c?i("Authorized ✔","bit-integrations"):i("Authorize","bit-integrations"),l.auth&&e.jsx(I,{size:"20",clr:"#022217",className:"ml-2"})]}),e.jsx("br",{}),e.jsxs("button",{onClick:v,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!c,children:[i("Next","bit-integrations"),e.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),e.jsx(T,{note:A})]})}export{V as default};
