import{H as e,T as t,V as n,W as r,X as i,b as a,st as o,z as s}from"./vue-quasar-CzR5lecU.js";import{r as c}from"./index-C94eCAzg.js";var l={name:`AuthGate`,props:{app:{type:Object,required:!0}},setup(e){return e.app}},u={key:0,class:`auth-gate`,"aria-live":`polite`},d={class:`auth-gate__panel`},f={class:`auth-gate__mark`},p=[`src`],m={class:`auth-gate__copy`},h={class:`auth-gate__status`},g={key:0,class:`auth-gate__device`},_={class:`auth-gate__code`},v={class:`auth-gate__url`},y={class:`auth-gate__actions`};function b(c,l,b,x,S,C){return c.showAuthGate?(i(),e(`main`,u,[s(`section`,d,[s(`div`,f,[s(`img`,{src:c.orchardLogoUrl,alt:`Orchard`},null,8,p)]),s(`div`,m,[l[2]||=s(`h2`,null,`Sign in to YouTube Music`,-1),s(`p`,null,o(c.authState.status===`starting`?`Opening sign in...`:c.authState.status===`pending`?`Finish sign in to continue.`:`Signed out.`),1)]),r(a,{unelevated:``,color:`primary`,icon:`login`,label:`Sign in`,class:`auth-gate__button`,loading:c.authState.status===`starting`,disable:c.socketState!==`connected`,onClick:c.startLogin},null,8,[`loading`,`disable`,`onClick`]),s(`div`,h,[r(t,{name:c.socketState===`connected`?`link`:`link_off`},null,8,[`name`]),s(`span`,null,o(c.socketState),1)]),c.authState.pending?(i(),e(`div`,g,[s(`div`,_,o(c.authState.pending.userCode),1),s(`div`,v,o(c.authState.pending.verificationUrl),1),s(`div`,y,[s(`button`,{type:`button`,onClick:l[0]||=(...e)=>c.openVerification&&c.openVerification(...e)},`Open link`),s(`button`,{type:`button`,onClick:l[1]||=e=>c.copyLoginText(c.authState.pending.userCode)},`Copy code`)])])):n(``,!0)])])):n(``,!0)}var x=c(l,[[`render`,b]]);export{x as default};