import{n as e}from"./rolldown-runtime-BG2f4sTM.js";import{Dvt as t,Mvt as n,Rft as r,Vft as i,Wft as a,gut as o,hut as s}from"./app-initial-BHB6SClA.js";function c(e){let t=(0,l.c)(37),{apiKeyValue:n,isApiKeyEntryVisible:r,isApiKeySignInPending:o,isChatGptSignInPending:c,onApiKeySecondaryAction:d,onApiKeySubmit:f,onApiKeyValueChange:p,onChatGptSignIn:m,onShowApiKeyEntry:h,apiKeySecondaryActionLabel:g}=e,_=a();if(r){let e;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,u.jsx)(i,{id:`electron.onboarding.login.apikey.label`,defaultMessage:`OpenAI API key`,description:`Label for API key input on desktop onboarding`}),t[0]=e):e=t[0];let r;t[1]===_?r=t[2]:(r=_.formatMessage({id:`electron.onboarding.login.apikey.placeholder`,defaultMessage:`sk-…`,description:`Placeholder for API key input on desktop onboarding`}),t[1]=_,t[2]=r);let a;t[3]===p?a=t[4]:(a=e=>p(e.target.value),t[3]=p,t[4]=a);let c;t[5]!==n||t[6]!==r||t[7]!==a?(c=(0,u.jsxs)(`label`,{className:`text-base font-medium text-token-foreground`,children:[e,(0,u.jsx)(`input`,{autoFocus:!0,className:`mt-2 w-full rounded-xl border border-token-border bg-token-input-background px-4 py-2.5 focus:ring-2 focus:ring-black/15 focus:outline-none`,placeholder:r,value:n,onChange:a})]}),t[5]=n,t[6]=r,t[7]=a,t[8]=c):c=t[8];let l;t[9]!==g||t[10]!==d?(l=(0,u.jsx)(s,{color:`secondary`,className:`flex flex-1 justify-center py-2`,onClick:d,children:g}),t[9]=g,t[10]=d,t[11]=l):l=t[11];let m;t[12]!==n||t[13]!==o?(m=n.trim().length===0||o,t[12]=n,t[13]=o,t[14]=m):m=t[14];let h;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,u.jsx)(i,{id:`electron.onboarding.login.apikey.continue`,defaultMessage:`Continue`,description:`Continue button label for API key sign-in on desktop onboarding`}),t[15]=h):h=t[15];let v;t[16]!==o||t[17]!==f||t[18]!==m?(v=(0,u.jsx)(s,{className:`flex flex-1 justify-center py-2`,onClick:f,disabled:m,loading:o,children:h}),t[16]=o,t[17]=f,t[18]=m,t[19]=v):v=t[19];let y;t[20]!==l||t[21]!==v?(y=(0,u.jsxs)(`div`,{className:`flex items-center gap-2`,children:[l,v]}),t[20]=l,t[21]=v,t[22]=y):y=t[22];let b;return t[23]!==c||t[24]!==y?(b=(0,u.jsxs)(`div`,{className:`flex w-full flex-col gap-3`,children:[c,y]}),t[23]=c,t[24]=y,t[25]=b):b=t[25],b}let v;t[26]===c?v=t[27]:(v=c?(0,u.jsx)(i,{id:`electron.onboarding.login.chatgpt.cancel`,defaultMessage:`Cancel sign-in`,description:`Cancel button label while ChatGPT sign-in is in progress on desktop onboarding`}):(0,u.jsx)(i,{id:`electron.onboarding.login.chatgpt.continue`,defaultMessage:`Continue with ChatGPT`,description:`Button label to sign in with ChatGPT on desktop onboarding`}),t[26]=c,t[27]=v);let y;t[28]!==m||t[29]!==v?(y=(0,u.jsx)(s,{color:`primary`,className:`w-full justify-center py-2.5`,onClick:m,children:v}),t[28]=m,t[29]=v,t[30]=y):y=t[30];let b;t[31]!==c||t[32]!==h?(b=c?null:(0,u.jsx)(s,{color:`outline`,className:`w-full justify-center py-2.5`,onClick:h,children:(0,u.jsx)(i,{id:`electron.onboarding.login.apikey.open`,defaultMessage:`Enter API key`,description:`Button label to open API key entry on desktop onboarding`})}),t[31]=c,t[32]=h,t[33]=b):b=t[33];let x;return t[34]!==y||t[35]!==b?(x=(0,u.jsxs)(`div`,{className:`flex w-full max-w-[200px] flex-col gap-3`,children:[y,b]}),t[34]=y,t[35]=b,t[36]=x):x=t[36],x}var l,u,d=e((()=>{l=n(),r(),o(),u=t()}));export{d as n,c as t};
//# sourceMappingURL=onboarding-login-content-DFGuiF6T.js.map