import{q as b,c as y,b as n,d,u as r,h as g,e as s,s as w,f as a,v as m,o as l,i as u,t as i,k as p,y as v,m as x,l as h}from"./app-Dtb5XozN.js";import{_ as k}from"./PublicLayout-b9Cnw3ho.js";const _={class:"min-h-[60vh] flex items-center justify-center py-12 px-4"},S={class:"w-full max-w-md"},V={class:"bg-white rounded-xl shadow-sm border border-gray-200 p-8"},B={key:0,class:"text-red-500 text-xs mt-1"},N={key:0,class:"text-red-500 text-xs mt-1"},C={class:"flex items-center justify-between"},D={class:"flex items-center"},F=["disabled"],M={class:"text-center text-sm text-gray-500 mt-6"},I={__name:"Login",setup(U){const t=b({email:"",password:"",remember:!1}),c=()=>{t.post("/storesight/login",{onFinish:()=>t.reset("password")})};return(f,e)=>(l(),y(k,null,{default:n(()=>[d(r(g),{title:"Login"}),s("div",_,[s("div",S,[e[9]||(e[9]=s("div",{class:"text-center mb-8"},[s("h1",{class:"text-3xl font-bold text-gray-900"},"Welcome back"),s("p",{class:"text-gray-500 mt-2"},"Sign in to your StoreSight AI account")],-1)),s("div",V,[s("form",{onSubmit:w(c,["prevent"]),class:"space-y-5"},[s("div",null,[e[3]||(e[3]=s("label",{class:"block text-sm font-medium text-gray-700 mb-1"},"Email",-1)),a(s("input",{"onUpdate:modelValue":e[0]||(e[0]=o=>r(t).email=o),type:"email",class:"w-full px-4 py-3 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-primary focus:border-primary outline-none",placeholder:"you@example.com"},null,512),[[m,r(t).email]]),r(t).errors.email?(l(),u("p",B,i(r(t).errors.email),1)):p("",!0)]),s("div",null,[e[4]||(e[4]=s("label",{class:"block text-sm font-medium text-gray-700 mb-1"},"Password",-1)),a(s("input",{"onUpdate:modelValue":e[1]||(e[1]=o=>r(t).password=o),type:"password",class:"w-full px-4 py-3 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-primary focus:border-primary outline-none",placeholder:"Your password"},null,512),[[m,r(t).password]]),r(t).errors.password?(l(),u("p",N,i(r(t).errors.password),1)):p("",!0)]),s("div",C,[s("label",D,[a(s("input",{"onUpdate:modelValue":e[2]||(e[2]=o=>r(t).remember=o),type:"checkbox",class:"w-4 h-4 text-primary border-gray-300 rounded focus:ring-primary"},null,512),[[v,r(t).remember]]),e[5]||(e[5]=s("span",{class:"ml-2 text-sm text-gray-600"},"Remember me",-1))]),e[6]||(e[6]=s("a",{href:"#",class:"text-sm text-primary hover:underline"},"Forgot password?",-1))]),s("button",{type:"submit",disabled:r(t).processing,class:"w-full bg-primary text-white font-semibold py-3 rounded-lg hover:bg-primary-dark transition disabled:opacity-50"},i(r(t).processing?"Signing in...":"Sign In"),9,F)],32),s("p",M,[e[8]||(e[8]=x(" Don't have an account? ",-1)),d(r(h),{href:f.$url("/register"),class:"text-primary font-medium hover:underline"},{default:n(()=>[...e[7]||(e[7]=[x("Register",-1)])]),_:1},8,["href"])])])])])]),_:1}))}};export{I as default};
