"use strict";(globalThis.webpackChunk_affine_web=globalThis.webpackChunk_affine_web||[]).push([[1149],{85911:(e,t,s)=>{s.r(t),s.d(t,{Component:()=>C,TagDetail:()=>f});var a=s(36870),l=s(77562),i=s(4892),n=s(81527),g=s(84064),r=s(10980),d=s(33907),o=s(17049),c=s(61569),j=s(86326),h=s(42277),x=s(26582),u=s(11352),p=s(65423),w=s(26798);let b=()=>(0,a.jsx)(p.Y,{center:(0,a.jsx)(w.w,{activeFilter:"tags"}),right:(0,a.jsx)(l.ze,{})}),f=({tagId:e})=>{let t=(0,r.h1)(d.q).globalContext,s=(0,r.h1)(o.j).workspace,h=(0,i.Q)(s.docCollection),p=(0,r.h1)(n.w6).tagList,w=(0,c.S)(p.tagByTagId$(e)),f=(0,c.S)(w?.pageIds$),C=(0,j.useMemo)(()=>{let e=new Set(f);return h.filter(t=>e.has(t.id))},[f,h]),I=(0,g.Tq)(),T=(0,c.S)(w?.value$);return((0,j.useEffect)(()=>{if(I&&w)return t.tagId.set(w.id),t.isTag.set(!0),()=>{t.tagId.set(null),t.isTag.set(!1)}},[w,t,I]),w)?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g.EY,{title:T??"Untitled"}),(0,a.jsx)(g.tC,{icon:"tag"}),(0,a.jsx)(g.XP,{children:(0,a.jsx)(b,{})}),(0,a.jsx)(g.s$,{children:(0,a.jsx)("div",{className:"br9e1q0",children:C.length>0?(0,a.jsx)(l.jF,{tag:w,listItem:C}):(0,a.jsx)(u.Pp,{type:"all",heading:(0,a.jsx)(l.Bo,{tag:w,workspaceId:s.id}),docCollection:s.docCollection})})})]}):(0,a.jsx)(x.PageNotFound,{})},C=()=>{let e=(0,h.g)();return(0,a.jsx)(f,{tagId:e.tagId})}}}]); //# sourceMappingURL=chunk.1149.1725766c.js.map