var P=Object.defineProperty;var x=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,I=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))I.call(s,a)&&g(t,a,s[a]);return t};import{r as j,j as e}from"./main-406.js";import{_ as r,L,N as T}from"./bi.394.85.js";import{s as S}from"./bi.763.849.js";import{T as w,t as f}from"./bi.150.760.js";function R({smailyConf:t,setSmailyConf:s,step:a,setStep:N,loading:c,setLoading:_,isInfo:i}){const[l,k]=j.useState(!1),[o,b]=j.useState({name:"",subdomain:"",api_user_name:"",api_user_password:""}),{smaily:n}=f,v=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),t!=null&&t.default,N(2)},d=u=>{const m=p({},t),h=p({},o);h[u.target.name]="",m[u.target.name]=u.target.value,b(h),s(m)},A=`<h4>To create API username and password, do the following.</h4>
  <ol>
  <li>Click on your <a href="https://www.sendsmaily.net/account/login/" target="_blank">account</a> name in the upper right corner of the page.</li>
  <li>From a dropdown menu choose “Preferences”.</li>
  <li>Click on the “Integrations” tab.</li>
  <li>And then underneath API Passwords click on “Create a new user”.</li>
  </ol>`;return e.jsxs("div",{className:"btcd-stp-page",style:{width:a===1&&900,height:a===1&&"auto"},children:[(n==null?void 0:n.youTubeLink)&&e.jsx(w,{title:n==null?void 0:n.title,youTubeLink:n==null?void 0:n.youTubeLink}),(n==null?void 0:n.docLink)&&e.jsx(w,{title:n==null?void 0:n.title,docLink:n==null?void 0:n.docLink}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:r("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:r("Integration Name...","bit-integrations"),disabled:i}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:o.name}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:r("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:r("Your Account","bit-integrations"),disabled:i}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:o.subdomain}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:r("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:r("API user name...","bit-integrations"),disabled:i}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:o.api_user_name}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:r("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:r("API user password...","bit-integrations"),disabled:i}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:o.api_user_password}),t.subdomain&&e.jsxs("small",{className:"d-blk mt-3",children:[r("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:r("Smaily API Token","bit-integrations")})]}),e.jsx("br",{}),e.jsx("br",{}),!i&&e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>S(t,s,b,k,c,_),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:l||c.auth,children:[l?r("Authorized ✔","bit-integrations"):r("Authorize","bit-integrations"),c.auth&&e.jsx(L,{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:!l,children:[r("Next","bit-integrations"),e.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),e.jsx(T,{note:A})]})}export{R as default};
