var f=Object.defineProperty;var u=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var x=(n,s,i)=>s in n?f(n,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[s]=i,l=(n,s)=>{for(var i in s||(s={}))A.call(s,i)&&x(n,i,s[i]);if(u)for(var i of u(s))w.call(s,i)&&x(n,i,s[i]);return n};import{j as e,_ as t}from"./main.2.9.0.js";import{b as k}from"./react-router.DMwpH23k.js";import{y as z,a9 as L}from"./Note.NSUdvR3c.js";import{e as $}from"./LineCommonFunc.CS8qjo7d.js";import{T as C}from"./TutorialLink.CFG7bS5c.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.CEA_lFLo.js";function M({formID:n,lineConf:s,setLineConf:i,step:c,setstep:j,isLoading:d,setIsLoading:N,setSnackbar:v,redirectLocation:E,isInfo:a}){const[o,y]=k.useState(!1),[b,m]=k.useState({accessToken:""}),T=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),j(2)},h=r=>{const g=l({},s),p=l({},b);p[r.target.name]="",g[r.target.name]=r.target.value,m(p),i(g)};return e.jsxs("div",{className:"btcd-stp-page",style:{width:c===1&&900,height:c===1&&"auto"},children:[e.jsx(C,{linkKey:"line"}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:t("Integration Name:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:h,name:"name",value:s.name,type:"text",placeholder:t("Integration Name...","bit-integrations"),disabled:a}),e.jsxs("small",{className:"d-blk mt-5",children:[t("To get access Token , Please Visit","bit-integrations")," ",e.jsx("a",{className:"btcd-link",href:"https://developers.line.biz/console/",target:"_blank",rel:"noreferrer",children:t("Line Console","bit-integrations")})]}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:t("Access Token:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:h,name:"accessToken",value:s.accessToken,type:"text",placeholder:t("Access Token...","bit-integrations"),disabled:a}),e.jsx("div",{style:{color:"red"},children:b.accessToken}),!a&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>$(s,i,m,y,N,v),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:o||d,children:[o?t("Authorized ✔","bit-integrations"):t("Authorize","bit-integrations"),d&&e.jsx(z,{size:"20",clr:"#022217",className:"ml-2"})]}),e.jsx("br",{}),e.jsxs("button",{onClick:T,className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",disabled:!o,children:[t("Next","bit-integrations"),e.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),e.jsx(L,{note:_})]})}const _=`<h2>${t("To get your Line access token:","bit-integrations")}</h2>
     <ul>
         <li>${t('Log in to the <a href="https://developers.line.biz/console/" target="_blank">Line Developers Console</a>.',"bit-integrations")}</li>
         <li>${t("Go to your provider and select the channel you want to use.","bit-integrations")}</li>
         <li>${t('Navigate to the "Messaging API" tab.',"bit-integrations")}</li>
         <li>${t('Scroll down to the "Channel access token (long-lived)" section.',"bit-integrations")}</li>
         <li>${t('Click the "issue" button to generate a new token.',"bit-integrations")}</li>
         <li>${t("Copy the generated token — this is your Line access token.","bit-integrations")}</li>
     </ul>`;export{M as default};
