1import{t as e}from"./vendor-react~index~index~publish-v4~publish~index~nag-sunset~nag-no-user~nag-degraded-perfo~ef2jpwjt-DLne3g0l.js";import{s as t}from"./rolldown-runtime-Czos8NxU.js";import{l as n}from"./vendor-markdown~index~index~index~index~index~index~index~index~index~index~index~markdown-~hcabgpoy-BRj_0M9Z.js";import{Lt as r,fn as i,pn as a}from"./icons-WQbxlx7M.js";import{t as o}from"./icon-bHpnW6dw.js";import{l as s}from"./vendor-react~index~nag-sunset~nag-no-user~nag-degraded-performance~index~index~index~index~~k5vco7za-D-CsX_iN.js";import{Lo as c,Ps as l,Qa as u,hc as d,jo as f}from"./claims-FR-UlCrs.js";import{t as p}from"./button-0_K07xv_.js";import{n as m,t as h}from"./hooks-C-d2Zm22.js";import{Nc as g,Rc as _,Xp as v,g as y}from"./app-5r5pIz90.js";import{t as b}from"./tooltip-WAZyxK5t.js";var x=t(e()),S=n();function C(e){let{icon:t,label:n,size:r=20,placement:i=`top`,hideTooltip:a,className:s}=e;return(0,S.jsx)(w,{title:n,placement:i,hideTooltip:a,className:s,children:(0,S.jsx)(`span`,{className:`comment__badge`,children:(0,S.jsx)(o,{icon:t,size:r})})})}var w=e=>{let{hideTooltip:t,children:n,...r}=e;return t?n:(0,S.jsx)(b,{...r,children:n})},T={[_.PREMIUM]:i,[_.PREMIUM_PLUS]:a,Creator:r};function E(e){switch(e){case _.PREMIUM:case _.PREMIUM_PLUS:return e;default:return`Creator`}}function D(e){let{membershipName:t,linkPage:n,placement:r,className:i,hideTooltip:a,uri:o}=e,s=h(),c=m(e=>g(e,o)),l=E(t);if(!t)return null;let u={size:40,placement:r,hideTooltip:a,className:i};return(0,S.jsx)(O,{linkPage:n,badgeToShow:l,dispatch:s,uri:o,validUserMembershipForChannel:c,children:(0,S.jsx)(C,{label:t,icon:T[l],...u})})}var O=e=>{let{linkPage:t,children:n,badgeToShow:r,dispatch:i,validUserMembershipForChannel:a,uri:o}=e,m=s();if(!t)return n;if(r===`Creator`&&o){let{channelName:e,channelClaimId:t}=c(o),r=f({channelName:e,channelClaimId:t}),s=new URLSearchParams;return s.set(d.QUERIES.VIEW,d.VIEWS.MEMBERSHIP),(0,S.jsx)(p,{onClick:()=>a?m({pathname:u(r),search:s.toString()}):i(y(v,{uri:r})),children:n})}return(0,S.jsx)(p,{navigate:`/$/${l}`,children:n})},k=x.memo(D);export{C as n,k as t}; 2//# sourceMappingURL=membershipBadge-BvQGWpaq.js.map
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.