1import{n as e}from"./client-BCY0Revy.js";import{t}from"./useQuery-Bk0o1c0V.js";import{t as n}from"./useAuth-BSBs0HEo.js";function r(){let{user:r,loading:i}=n(),{data:a,isLoading:o}=t({queryKey:[`user-roles`,r?.id],enabled:!!r?.id,queryFn:async()=>{let{data:t,error:n}=await e.from(`user_roles`).select(`role`).eq(`user_id`,r.id).in(`role`,[`admin`,`link_manager`]);if(n)throw n;let i=(t??[]).map(e=>e.role);return{isAdmin:i.includes(`admin`),isLinkManager:i.includes(`link_manager`)}}});return{isAdmin:!!a?.isAdmin,isLinkManager:!!a?.isLinkManager,loading:i||!!r&&o,user:r}}export{r as t};
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.