1import{r as c,m as d,j as e}from"./app-DDm4dLCY.js";import{B as r}from"./button-D9X3vUxO.js";import{C as l,a as m,b as p,c as u,d as x}from"./card-DifmMaC0.js";import{D as h,a as v,b as j,c as g,d as C,e as f}from"./dialog-CEzzDisZ.js";import{S as y}from"./layout-QldtkKSI.js";/* empty css */import"./x-CHtAT9W1.js";import"./index-Cdxa91Ef.js";import"./nav-user-DvzLnKQ3.js";import"./dropdown-menu-BJ85x3F3.js";import"./index-BT5q4viw.js";import"./lock-BXAuzEcX.js";import"./arrow-left-b-Kv1Ly1.js";import"./AppHead-B4kTnGqC.js";function O({connections:o}){const[t,a]=c.useState(null),i=d({}),n=()=>{i.delete(route("oauth-connections.destroy",t.id),{preserveScroll:!0,preserveState:!0,onSuccess:()=>a(null)})};return e.jsxs(y,{title:"Connected apps",children:[e.jsxs(l,{children:[e.jsxs(m,{children:[e.jsx(p,{children:"Connected apps"}),e.jsx(u,{children:"Apps and AI agents you have connected to your Snapto account over OAuth, such as a Claude connector. Revoking a connection immediately cuts off its access."})]}),e.jsx(x,{children:o.length===0?e.jsx("p",{className:"text-muted-foreground text-sm",children:"You have not connected any apps yet."}):e.jsx("div",{className:"divide-border divide-y",children:o.map(s=>e.jsxs("div",{className:"flex items-center justify-between gap-4 py-4 first:pt-0 last:pb-0",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"font-medium",children:s.client_name}),e.jsxs("p",{className:"text-muted-foreground text-sm",children:["Connected ",s.granted,s.last_used_ago?` · last used ${s.last_used_ago}`:" · not used yet"]})]}),e.jsx(r,{variant:"ghost",size:"sm",className:"text-destructive hover:text-destructive",onClick:()=>a(s),children:"Revoke"})]},s.id))})})]}),e.jsx(h,{open:!!t,onOpenChange:s=>!s&&a(null),children:e.jsxs(v,{children:[e.jsxs(j,{children:[e.jsx(g,{children:"Revoke access"}),e.jsx(C,{children:t?`${t.client_name} will lose access to your Snapto account. It would need to be reconnected to regain access.`:""})]}),e.jsxs(f,{children:[e.jsx(r,{variant:"outline",onClick:()=>a(null),children:"Cancel"}),e.jsx(r,{variant:"destructive",onClick:n,disabled:i.processing,children:"Revoke access"})]})]})})]})}export{O as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.