(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[974],{8419:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var l=s(8111),r=s(8719),n=s(3577),a=s(5271);function d(){let{login:e}=(0,r.U)(),[t,s]=(0,a.useState)(""),[n,d]=(0,a.useState)(""),[i,o]=(0,a.useState)(!1),c=async()=>{var s;if(!t.trim())return;o(!0),d("");let l=await e(t.trim());o(!1),l.success||d(null!=(s=l.error)?s:"Login fehlgeschlagen")};return(0,l.jsxs)("div",{className:"flex flex-col items-center justify-center h-full",children:[(0,l.jsxs)("div",{className:"text-center mb-8",children:[(0,l.jsx)("p",{className:"text-4xl font-mono font-bold text-blue-500 mb-2",children:"Alfred"}),(0,l.jsx)("p",{className:"text-sm text-gray-500",children:"Self-hosted AI Assistant"})]}),(0,l.jsxs)("div",{className:"bg-[#111111] border border-[#1f1f1f] rounded-xl p-6 w-80",children:[(0,l.jsx)("p",{className:"text-sm text-gray-400 mb-4",children:"Invite-Code eingeben um dich zu verbinden:"}),(0,l.jsx)("input",{type:"text",value:t,onChange:e=>s(e.target.value),onKeyDown:e=>"Enter"===e.key&&c(),placeholder:"6-stelliger Code",maxLength:6,className:"w-full bg-[#0d0d0d] border border-[#2a2a2a] rounded-lg px-4 py-3 text-center text-xl font-mono text-gray-200 tracking-widest focus:outline-none focus:border-blue-500 mb-3"}),n&&(0,l.jsx)("p",{className:"text-red-400 text-xs mb-3",children:n}),(0,l.jsx)("button",{onClick:c,disabled:i||t.length<6,className:"w-full bg-blue-600 hover:bg-blue-700 disabled:opacity-50 text-white rounded-lg py-2.5 text-sm font-medium transition-colors",children:i?"Verbinde...":"Verbinden"}),(0,l.jsx)("p",{className:"text-xs text-gray-600 mt-4 text-center",children:"Code erh\xe4ltst du vom Admin per Telegram/Matrix."})]})]})}function i(){let{user:e}=(0,r.U)();return e?(0,l.jsx)(n.ChatPage,{}):(0,l.jsx)(d,{})}},9542:(e,t,s)=>{Promise.resolve().then(s.bind(s,8419))}},e=>{e.O(0,[915,719,577,814,743,358],()=>e(e.s=9542)),_N_E=e.O()}]);