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