import{L as e,O as t,P as n,b as r,t as i,y as a}from"./jsx-runtime-DLhMyTcm.js";import{t as o}from"./button-DxvPbmBs.js";import{t as s}from"./shield-E_i2WdnH.js";import{t as c}from"./zap-BWlR9dm3.js";import{J as l,X as u,Z as d,m as f}from"./index-B9ptohSA.js";import{t as p}from"./api-toast-BVwZOF8R.js";import{t as m}from"./use-document-meta-Bjf8eIPh.js";var h=e(n(),1),g=i(),_=[{icon:f,title:`Workflow Orchestration`,description:`Build and run multi-step workflows with shell, HTTP, and AI agent steps.`},{icon:c,title:`Real-time Monitoring`,description:`Track workflow executions, costs, and durations from a single dashboard.`},{icon:s,title:`Built-in AI Agents`,description:`Leverage Claude to analyze, summarize, and act on workflow data.`}];function v(){let[e,n]=(0,h.useState)(``),[i,s]=(0,h.useState)(``),[c,f]=(0,h.useState)(!1),v=t(),y=u();return m({title:`Sign in`,description:`Sign in to your Ironflow account.`}),(0,g.jsxs)(`div`,{className:`grid min-h-screen lg:grid-cols-2`,children:[(0,g.jsxs)(`div`,{className:`relative hidden lg:flex flex-col justify-between bg-gradient-to-b from-neutral-900 to-neutral-950 p-10 text-white overflow-hidden`,children:[(0,g.jsx)(`div`,{className:`absolute -top-24 -left-24 size-96 rounded-full bg-primary/20 blur-3xl`}),(0,g.jsx)(`div`,{className:`absolute -bottom-32 -right-32 size-96 rounded-full bg-primary/15 blur-3xl`}),(0,g.jsxs)(`div`,{className:`relative flex items-center gap-3`,children:[(0,g.jsx)(`img`,{src:`/logo.svg`,alt:`ironflow`,className:`size-9 rounded-lg`}),(0,g.jsx)(`span`,{className:`text-xl font-bold tracking-tight`,children:`ironflow`})]}),(0,g.jsx)(`div`,{className:`relative space-y-8`,children:_.map(e=>(0,g.jsxs)(`div`,{className:`flex gap-4`,children:[(0,g.jsx)(`div`,{className:`flex size-10 shrink-0 items-center justify-center rounded-lg border border-white/10 bg-white/5 backdrop-blur-sm`,children:(0,g.jsx)(e.icon,{className:`size-5 text-primary`})}),(0,g.jsxs)(`div`,{children:[(0,g.jsx)(`h3`,{className:`font-semibold`,children:e.title}),(0,g.jsx)(`p`,{className:`text-neutral-400 text-sm mt-1`,children:e.description})]})]},e.title))}),(0,g.jsxs)(`p`,{className:`relative text-xs text-neutral-500`,children:[`© `,new Date().getFullYear(),` ironflow`]})]}),(0,g.jsxs)(`div`,{className:`relative flex flex-col p-6 sm:p-10 overflow-hidden`,children:[(0,g.jsxs)(`div`,{className:`relative flex items-center gap-3 lg:hidden mb-auto`,children:[(0,g.jsx)(`img`,{src:`/logo.svg`,alt:`ironflow`,className:`size-9 rounded-lg`}),(0,g.jsx)(`span`,{className:`text-xl font-bold tracking-tight`,children:`ironflow`})]}),(0,g.jsx)(`div`,{className:`relative flex flex-1 flex-col items-center justify-center`,children:(0,g.jsxs)(`div`,{className:`w-full max-w-sm space-y-8`,children:[(0,g.jsxs)(`div`,{className:`space-y-2 text-center lg:text-left`,children:[(0,g.jsx)(`h1`,{className:`text-2xl font-bold tracking-tight`,children:`Welcome back`}),(0,g.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Sign in to your account to continue`})]}),(0,g.jsxs)(`form`,{onSubmit:t=>{t.preventDefault(),f(!0),p(a.post(`/auth/sign-in`,{email:e,password:i}).then(()=>y(d())),{loading:`Signing in...`,success:`Signed in!`,error:`Sign in failed`}).then(()=>v(`/`)).catch(()=>{}).finally(()=>f(!1))},className:`space-y-4`,children:[(0,g.jsxs)(`div`,{className:`space-y-2`,children:[(0,g.jsx)(`label`,{htmlFor:`email`,className:`text-sm font-medium`,children:`Email`}),(0,g.jsx)(l,{id:`email`,type:`email`,placeholder:`you@example.com`,value:e,onChange:e=>n(e.target.value),required:!0})]}),(0,g.jsxs)(`div`,{className:`space-y-2`,children:[(0,g.jsx)(`label`,{htmlFor:`password`,className:`text-sm font-medium`,children:`Password`}),(0,g.jsx)(l,{id:`password`,type:`password`,placeholder:`********`,value:i,onChange:e=>s(e.target.value),required:!0})]}),(0,g.jsx)(o,{type:`submit`,className:`w-full`,size:`lg`,disabled:c,children:c?`Signing in...`:`Sign in`})]}),(0,g.jsxs)(`p`,{className:`text-center text-sm text-muted-foreground`,children:[`Don't have an account?`,` `,(0,g.jsx)(r,{to:`/sign-up`,className:`font-medium text-foreground hover:underline`,children:`Sign up`})]})]})})]})]})}export{v as Component};