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