import{_ as S}from"./BCyJ4ZJE.js";import{au as C,c9 as L,bL as w,cq as V,cw as F,W as v,bi as P,F as d,O as R,cY as T,ce as I,cg as $,bI as A,bc as E,b2 as j,b0 as D,bm as M,aa as N,ch as Y,c7 as i,bB as r,Z as l,a3 as p,cS as f,bR as k,X as O,u as q,Y as z}from"#entry";import{V as G}from"./CAodMEV_.js";import"./CFrOycco.js";import"./7nzMR1a0.js";import"./BPHK4Dzs.js";import"./CEoxYnb5.js";import"./Cp3UUybv.js";import"./BKDgfSxC.js";import"./D_qxKlPu.js";import"./BbYgWsNS.js";import"./BTAkQetH.js";import"./B22rgjjN.js";import"./DsNA9-h5.js";import"./VoZA954X.js";import"./-GcL7px7.js";const U={actions:"button@2",article:"heading, paragraph",avatar:"avatar",button:"button",card:"image, heading","card-avatar":"image, list-item-avatar",chip:"chip","date-picker":"list-item, heading, divider, date-picker-options, date-picker-days, actions","date-picker-options":"text, avatar@2","date-picker-days":"avatar@28",divider:"divider",heading:"heading",image:"image","list-item":"text","list-item-avatar":"avatar, text","list-item-two-line":"sentences","list-item-avatar-two-line":"avatar, sentences","list-item-three-line":"paragraph","list-item-avatar-three-line":"avatar, paragraph",ossein:"ossein",paragraph:"text@3",sentences:"text@2",subtitle:"text",table:"table-heading, table-thead, table-tbody, table-tfoot","table-heading":"chip, text","table-thead":"heading@6","table-tbody":"table-row-divider@6","table-row-divider":"table-row, divider","table-row":"text@6","table-tfoot":"text@2, avatar@2",text:"text"};function W(e){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return v("div",{class:M(["v-skeleton-loader__bone",`v-skeleton-loader__${e}`])},[a])}function _(e){const[a,t]=e.split("@");return Array.from({length:t}).map(()=>c(a))}function c(e){let a=[];if(!e)return a;const t=U[e];if(e!==t){if(e.includes(","))return x(e);if(e.includes("@"))return _(e);t.includes(",")?a=x(t):t.includes("@")?a=_(t):t&&a.push(c(t))}return[W(e,a)]}function x(e){return e.replace(/\s/g,"").split(",").map(c)}const X=A({boilerplate:Boolean,color:String,loading:Boolean,loadingText:{type:String,default:"$vuetify.loading"},type:{type:[String,Array],default:"ossein"},...D(),...j(),...E()},"VSkeletonLoader"),Z=C()({name:"VSkeletonLoader",inheritAttrs:!1,props:X(),setup(e,a){let{attrs:t,slots:o}=a;const{backgroundColorClasses:g,backgroundColorStyles:s}=L(()=>e.color),{dimensionStyles:u}=I(e),{elevationClasses:m}=$(e),{themeClasses:n}=w(e),{t:b}=V(),y=R(()=>c(T(e.type).join(",")));return F(()=>{const h=!o.default||e.loading,B=e.boilerplate||!h?{}:{ariaLive:"polite",ariaLabel:b(e.loadingText),role:"alert"};return h?v("div",P({class:["v-skeleton-loader",{"v-skeleton-loader--boilerplate":e.boilerplate},n.value,g.value,m.value],style:[s.value,u.value]},B,t),[y.value]):v(d,null,[o.default?.()])}),{}}}),H={key:0,class:"d-flex flex-column ga-1"},J=N({__name:"FederatedResources",props:{eventId:{},canModerate:{type:Boolean}},setup(e){const a=e,{data:t,refresh:o}=Y(()=>`/api/resources/list/${a.eventId}`,"$bjBgShTYGP");return(g,s)=>{const u=S,m=q;return i(t)?.length?(r(),l("div",H,[p(m,null,{fallback:f(()=>[(r(!0),l(d,null,k(Math.min(i(t).length,3),n=>(r(),O(Z,{key:n,type:"article",class:"mb-2"}))),128))]),default:f(()=>[(r(!0),l(d,null,k(i(t),n=>(r(),l(d,{key:n.activitypub_id},[p(G,{variant:"dashed"}),p(u,{resource:n,"can-moderate":e.canModerate,"event-id":e.eventId,onUpdate:s[0]||(s[0]=b=>i(o)())},null,8,["resource","can-moderate","event-id"])],64))),128))]),_:1})])):z("",!0)}}}),ve=Object.assign(J,{__name:"EventFederatedResources"});export{ve as default};
