import{r as y}from"./chunk-XYUXA3LT.js";import{a as w}from"./chunk-BUPI2ADN.js";import{Ca as c,Da as m,Kb as g,Na as T,Va as R,Yb as N,ba as M,cb as d,db as p,eb as u,ib as A,jg as L,la as a,ma as s,mb as C,nb as O,ob as E,qb as S,rb as f,xb as h,ya as P,yb as v,zb as D}from"./chunk-X3RCWQ3R.js";import{i as o}from"./chunk-SR6RTMQI.js";var $=["modal"];function H(r,i){if(r&1){let _=A();d(0,"div",2)(1,"h4",3),C(2,1),p(),d(3,"button",4),S("click",function(){let e=a(_).close;return s(e());}),u(4,"my-global-icon",5),p()(),u(5,"div",6),d(6,"div",7)(7,"input",8),S("click",function(){let e=a(_).close;return s(e());})("key.enter",function(){let e=a(_).close;return s(e());}),p()();}if(r&2){let _=f();c(2),O(_.displayName),E(2),c(3),R("innerHTML",_.htmlSupport,P);}}var U=(()=>{let i=class i{constructor(t,e){o(this,"markdownService");o(this,"modalService");o(this,"video",null);o(this,"videoChannel",null);o(this,"modal");o(this,"htmlSupport","");o(this,"displayName","");this.markdownService=t,this.modalService=e;}show(){var n;let t=this.modalService.open(this.modal,{centered:!0}),e=((n=this.video)==null?void 0:n.support)||this.videoChannel.support;return this.markdownService.enhancedMarkdownToHTML({markdown:e}).then(l=>{this.htmlSupport=l;}),this.displayName=this.video?this.video.channel.displayName:this.videoChannel.displayName,t;}};o(i,"\u0275fac",function(e){return new(e||i)(m(L),m(y));}),o(i,"\u0275cmp",M({type:i,selectors:[["my-support-modal"]],viewQuery:function(e,n){if(e&1&&h($,7),e&2){let l;v(l=D())&&(n.modal=l.first);}},inputs:{video:"video",videoChannel:"videoChannel"},standalone:!0,features:[g],decls:2,vars:0,consts:()=>{let t;t="Close this modal";let e;e="Mbylle";let n;return n="Support "+"\uFFFD0\uFFFD"+"",[["modal",""],n,[1,"modal-header"],[1,"modal-title"],["title",t,1,"border-0","p-0",3,"click"],["iconName","cross"],[1,"modal-body",3,"innerHTML"],[1,"modal-footer","inputs"],["type","button","role","button","value",e,1,"peertube-button","secondary-button",3,"click","key.enter"]];},template:function(e,n){e&1&&T(0,H,8,2,"ng-template",null,0,N);},dependencies:[w],encapsulation:2}));let r=i;return r;})();export{U as a};/**i18n:3d16453f213eb5db982e7e7dd90631843ac5d3f860726a614777c3e9e3f9b57e*///# sourceMappingURL=chunk-ARMZXFJG.js.map