import{An as e,Ct as t,Dt as n,Et as r,Ft as i,Ht as a,It as o,Nn as s,On as c,Qt as l,Tt as u,Xt as d,_n as f,an as p,en as m,jn as h,nn as g,on as _,rn as v,tn as y,vn as b,wn as x,wt as S}from"./app-4kCgdoJR.js";var C={class:`max-w-xl text-sm text-gray-600 dark:text-gray-400`},w={key:0,class:`mt-5 space-y-6`},T={key:0,class:`h-8 w-8 text-gray-500`,xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`},E={key:1,class:`h-8 w-8 text-gray-500`,xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`},D={class:`ms-3`},O={class:`text-sm text-gray-600 dark:text-gray-400`},k={class:`text-xs text-gray-500`},A={key:0,class:`font-semibold text-green-500`},j={key:1},M={class:`mt-5 flex items-center`},N={class:`mt-4`},P={__name:`LogoutOtherBrowserSessionsForm`,props:{sessions:Array},setup(P){let F=c(!1),I=c(null),L=a({password:``}),R=()=>{F.value=!0,setTimeout(()=>I.value.focus(),250)},z=()=>{L.delete(route(`other-browser-sessions.destroy`),{preserveScroll:!0,onSuccess:()=>B(),onError:()=>I.value.focus(),onFinish:()=>L.reset()})},B=()=>{F.value=!1,L.reset()};return(a,c)=>(f(),y(i,null,{title:x(()=>[p(s(a.$t(`Browser Sessions`)),1)]),description:x(()=>[...c[1]||=[p(` Manage and log out your active sessions on other browsers and devices. `,-1)]]),content:x(()=>[m(`div`,C,s(a.$t(`If necessary, you may log out of all of your other browser sessions across all of your devices. Some of your recent sessions are listed below; however, this list may not be exhaustive. If you feel your account has been compromised, you should also update your password.`)),1),P.sessions.length>0?(f(),v(`div`,w,[(f(!0),v(l,null,b(P.sessions,(e,t)=>(f(),v(`div`,{key:t,class:`flex items-center`},[m(`div`,null,[e.agent.is_desktop?(f(),v(`svg`,T,[...c[2]||=[m(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M9 17.25v1.007a3 3 0 01-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0115 18.257V17.25m6-12V15a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 15V5.25m18 0A2.25 2.25 0 0018.75 3H5.25A2.25 2.25 0 003 5.25m18 0V12a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 12V5.25`},null,-1)]])):(f(),v(`svg`,E,[...c[3]||=[m(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M10.5 1.5H8.25A2.25 2.25 0 006 3.75v16.5a2.25 2.25 0 002.25 2.25h7.5A2.25 2.25 0 0018 20.25V3.75a2.25 2.25 0 00-2.25-2.25H13.5m-3 0V3h3V1.5m-3 0h3m-3 18.75h3`},null,-1)]]))]),m(`div`,D,[m(`div`,O,s(e.agent.platform?e.agent.platform:a.$t(`Unknown`))+` - `+s(e.agent.browser?e.agent.browser:a.$t(`Unknown`)),1),m(`div`,null,[m(`div`,k,[p(s(e.ip_address)+`, `,1),e.is_current_device?(f(),v(`span`,A,s(a.$t(`This device`)),1)):(f(),v(`span`,j,s(a.$t(`Last active`))+` `+s(e.last_active),1))])])])]))),128))])):g(``,!0),m(`div`,M,[_(u,{onClick:R},{default:x(()=>[p(s(a.$t(`Log Out Other Browser Sessions`)),1)]),_:1}),_(o,{on:e(L).recentlySuccessful,class:`ms-3`},{default:x(()=>[p(s(a.$t(`Done.`)),1)]),_:1},8,[`on`])]),_(n,{show:F.value,onClose:B},{title:x(()=>[p(s(a.$t(`Log Out Other Browser Sessions`)),1)]),content:x(()=>[p(s(a.$t(`Please enter your password to confirm you would like to log out of your other browser sessions across all of your devices.`))+` `,1),m(`div`,N,[_(t,{type:`password`,ref_key:`passwordInput`,ref:I,placeholder:`Password`,modelValue:e(L).password,"onUpdate:modelValue":c[0]||=t=>e(L).password=t,class:`mt-1 block w-3/4`,autocomplete:`current-password`,onKeyup:d(z,[`enter`])},null,8,[`modelValue`]),_(r,{message:e(L).errors.password,class:`mt-2`},null,8,[`message`])])]),footer:x(()=>[_(S,{onClick:B},{default:x(()=>[p(s(a.$t(`Cancel`)),1)]),_:1}),_(u,{class:h([`ms-3`,{"opacity-25":e(L).processing}]),disabled:e(L).processing,onClick:z},{default:x(()=>[p(s(a.$t(`Log Out Other Browser Sessions`)),1)]),_:1},8,[`disabled`,`class`])]),_:1},8,[`show`])]),_:1}))}};export{P as default};