import{n as e}from"./chunk-Bh1tDfsg.js";import{a as t,i as n,s as r}from"./graphql-Dsv3IYEA.js";import{t as i}from"./jsx-runtime-BKZ-v_4m.js";import{n as a}from"./not-found-i5RsCZif.js";import{d as o,t as s}from"./useTranslation-l30fIyqu.js";import{t as c}from"./Heading-DoTcf-3Y.js";import{D as l,I as u,d,f}from"./main-CxGi0fIe.js";import{n as p}from"./computer-DaLupJB4.js";import{a as m,i as h,n as g,o as _,r as v,t as y}from"./SessionInfo-DrazDF4L.js";var b=e(o(),1),x={externalLink:`_external-link_b03cz_8`},S=i(),C=({children:e,className:t,...n})=>(0,S.jsx)(u,{className:(0,b.default)(t,x.externalLink),target:`_blank`,...n,children:e}),w=n(`
  fragment OAuth2Client_detail on Oauth2Client {
    id
    clientId
    clientName
    clientUri
    logoUri
    tosUri
    policyUri
    redirectUris
  }
`),T=({uri:e})=>{if(!e)return null;let t=new URL(e);return(0,S.jsx)(C,{href:e,children:t.host+t.pathname})},E=({client:e})=>{let n=t(w,e),{t:r}=s();return(0,S.jsxs)(`div`,{className:`flex flex-col gap-10`,children:[(0,S.jsxs)(`header`,{className:`flex flex-row gap-2 justify-start items-center`,children:[(0,S.jsx)(p,{logoUri:n.logoUri||void 0,name:n.clientName||n.clientId,size:`1.5rem`}),(0,S.jsx)(c,{children:n.clientName})]}),(0,S.jsxs)(h,{children:[(0,S.jsx)(m,{children:r(`frontend.oauth2_client_detail.details_title`)}),(0,S.jsxs)(v,{children:[n.clientName&&(0,S.jsxs)(y,{children:[(0,S.jsx)(g,{children:r(`frontend.oauth2_client_detail.name`)}),(0,S.jsx)(_,{children:n.clientName})]}),n.tosUri&&(0,S.jsxs)(y,{children:[(0,S.jsx)(g,{children:r(`frontend.oauth2_client_detail.terms`)}),(0,S.jsx)(_,{children:(0,S.jsx)(T,{uri:n.tosUri})})]}),n.policyUri&&(0,S.jsxs)(y,{children:[(0,S.jsx)(g,{children:r(`frontend.oauth2_client_detail.policy`)}),(0,S.jsx)(_,{children:(0,S.jsx)(T,{uri:n.policyUri})})]})]})]})]})};function D(){let{id:e}=d.useParams(),{data:{oauth2Client:t}}=r(f(e));if(!t)throw a();return(0,S.jsx)(l,{children:(0,S.jsx)(E,{client:t})})}export{D as component};
//# sourceMappingURL=clients._id-BV3mzRfs.js.map