import{t as $,r as i,o as g,k as b,l as t,d as c,f as a,m as I,q as P,z as k,e as F,a as B,A as L,x as p,y as u,F as H}from"./app-44623493.js";const T={class:"grid grid-cols-3 gap-6"},U={class:"col-span-3 sm:col-span-1"},R={class:"col-span-3 sm:col-span-1"},C={class:"col-span-3 sm:col-span-1"},h={__name:"FailedLoginAttemptFilter",emits:["hide"],setup(y,{emit:_}){const f={email:"",ip:"",startDate:"",endDate:""},e=$({...f});return(r,n)=>{const d=i("BaseInput"),s=i("DatePicker"),v=i("FilterForm");return g(),b(v,{"init-form":f,form:e,onHide:n[4]||(n[4]=l=>_("hide"))},{default:t(()=>[c("div",T,[c("div",U,[a(d,{type:"text",modelValue:e.email,"onUpdate:modelValue":n[0]||(n[0]=l=>e.email=l),name:"email",label:r.$trans("auth.login.props.email")},null,8,["modelValue","label"])]),c("div",R,[a(d,{type:"text",modelValue:e.ip,"onUpdate:modelValue":n[1]||(n[1]=l=>e.ip=l),name:"ip",label:r.$trans("utility.activity.ip")},null,8,["modelValue","label"])]),c("div",C,[a(s,{start:e.startDate,"onUpdate:start":n[2]||(n[2]=l=>e.startDate=l),end:e.endDate,"onUpdate:end":n[3]||(n[3]=l=>e.endDate=l),name:"dateBetween",as:"range",label:r.$trans("general.date_between")},null,8,["start","end","label"])])])]),_:1},8,["form"])}}},j={name:"FailedLoginAttemptList"},N=Object.assign(j,{setup(y){I();const _=P("emitter"),f="auth/failedLoginAttempt/",e=k(!1),r=$({}),n=d=>{Object.assign(r,d)};return(d,s)=>{const v=i("PageHeaderAction"),l=i("PageHeader"),D=i("ParentTransition"),m=i("DataCell"),V=i("DataRow"),w=i("DataTable"),A=i("ListItem");return g(),b(A,{"init-url":f,onSetItems:n},{header:t(()=>[a(l,{title:d.$trans("auth.failed_login_attempt")},{default:t(()=>[a(v,{url:"failed-login-attempts/",name:"User",title:d.$trans("auth.failed_login_attempt"),actions:["filter"],onToggleFilter:s[0]||(s[0]=o=>e.value=!e.value)},null,8,["title"])]),_:1},8,["title"])]),filter:t(()=>[a(D,{appear:"",visibility:e.value},{default:t(()=>[a(h,{onRefresh:s[1]||(s[1]=o=>F(_).emit("listItems")),onHide:s[2]||(s[2]=o=>e.value=!1)})]),_:1},8,["visibility"])]),default:t(()=>[a(D,{appear:"",visibility:!0},{default:t(()=>[a(w,{header:r.headers,meta:r.meta,module:"auth.failed_login_attempts",onRefresh:s[3]||(s[3]=o=>F(_).emit("listItems"))},{default:t(()=>[(g(!0),B(H,null,L(r.data,o=>(g(),b(V,{key:o.uuid},{default:t(()=>[a(m,{name:"email"},{default:t(()=>[p(u(o.email),1)]),_:2},1024),a(m,{name:"ip"},{default:t(()=>[p(u(o.ip),1)]),_:2},1024),a(m,{name:"browser"},{default:t(()=>[p(u(o.browser),1)]),_:2},1024),a(m,{name:"os"},{default:t(()=>[p(u(o.os),1)]),_:2},1024),a(m,{name:"createdAt"},{default:t(()=>[p(u(o.createdAt.formatted),1)]),_:2},1024)]),_:2},1024))),128))]),_:1},8,["header","meta"])]),_:1})]),_:1})}}});export{N as default};
