1import{e as P,f as g}from"./vendor-vue-BIDZeepx.js";import{P as C}from"./PageFrame-CmNWALAg.js";import{A as R}from"./AsyncState-C1wY1NSf.js";import{E as V}from"./EmptyState-HBFSUaTT.js";import{C as l}from"./ChromeCard-DkvfllPh.js";import{S as i}from"./SectionHeader-60mU8zeF.js";import{K as x}from"./KeyValueGrid-NDsmIuoC.js";import{u as L}from"./useLiveFetch-BwWvTjVn.js";import{as as N,_ as b}from"./index-BNPflmqD.js";import{k as B,c as y,C as c,D as r,u as a,y as s,Q as o,z as u,L as _,K as m,H as v,P as I,J as z,G as n}from"./vendor-misc-5pJBpqhN.js";import"./creatorFieldHelp-BrZsjpkG.js";import"./vendor-tanstack-B6ELLr_Q.js";import"./vendor-sentry-84cD2ryj.js";import"./vendor-utils-CxkvrZ9U.js";const D={class:"portal-message"},E={class:"scope-list"},F={class:"portal-message"},K=B({__name:"AgencyPortalPage",setup(G){const h=P(),d=y(()=>String(h.params.orgId??"")),{data:e,loading:k,error:S,refresh:w}=L(async()=>d.value?N(d.value):null),A=y(()=>e.value?[{label:"Agency",value:e.value.organization_name},{label:"Status",value:e.value.status},{label:"Accepted",value:e.value.accepted_at?new Date(e.value.accepted_at).toLocaleString():"â"}]:[]);return(H,t)=>{var p;return s(),c(C,{title:((p=a(e))==null?void 0:p.organization_name)||"Agency portal",description:"Read-only view of data shared with your agency."},{default:r(()=>[o(R,{loading:a(k),error:a(S),onRetry:a(w)},{default:r(()=>[a(e)?(s(),u(_,{key:1},[o(l,null,{default:r(()=>[o(i,{title:"Shared with agency"}),m("p",D,v(a(e).message),1),o(x,{items:A.value},null,8,["items"])]),_:1}),a(e).shared_scopes.length?(s(),c(l,{key:0},{default:r(()=>[o(i,{title:"Shared data scopes"}),m("ul",E,[(s(!0),u(_,null,I(a(e).shared_scopes,f=>(s(),u("li",{key:f.key},v(f.label),1))),128))])]),_:1})):z("",!0),o(l,null,{default:r(()=>[o(i,{title:"Manage access"}),m("p",F,[t[2]||(t[2]=n(" Revoke access from ",-1)),o(a(g),{to:"/account/agencies"},{default:r(()=>[...t[0]||(t[0]=[n("Account â Agencies",-1)])]),_:1}),t[3]||(t[3]=n(" or connect platforms via ",-1)),o(a(g),{to:"/share-with-agency"},{default:r(()=>[...t[1]||(t[1]=[n("Share with agency",-1)])]),_:1}),t[4]||(t[4]=n(". ",-1))])]),_:1})],64)):(s(),c(V,{key:0,title:"No shared access",description:"You do not have an active link with this agency."}))]),_:1},8,["loading","error","onRetry"])]),_:1},8,["title"])}}}),te=b(K,[["__scopeId","data-v-f5a54909"]]);export{te 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.