import{E as O}from"./chunk-XZLMPP4F.js";import{a as R}from"./chunk-VJOXMIQY.js";import{$a as g,Aa as a,Bb as m,Cb as x,Db as H,Fc as D,Ka as T,Lb as N,Qa as w,Qb as P,Rb as L,Ya as C,_a as h,cf as E,df as z,eb as s,fa as c,fb as f,ga as u,gb as b,hb as v,oa as _,qc as S,rb as k,wa as M,yc as p,zb as y}from"./chunk-CUA2BO3S.js";import{i as d}from"./chunk-75J4RO44.js";var V=["*"];function j(e,o){if(e&1&&(f(0,"strong",3),P(1),b()),e&2){let l=m(2);a(),L(l.helpTitle());}}function I(e,o){if(e&1&&v(0,"p",4),e&2){let l=m(2);s("innerHTML",l.markdownHTML,M);}}function A(e,o){if(e&1&&(h(0,j,2,1,"strong",3),h(1,I,1,1,"p",4),H(2)),e&2){let l=m();g(l.helpTitle()?0:-1),a(),g(l.markdownHTML?1:-1);}}var q=(()=>{let o=class o{helpTitle=p("");helpType=p("custom");iconName=p("help");supportRelMe=p(!1,{transform:D});title=p("Obtindre ajuda");tooltipPlacement=p("right auto");autoClose=p("outside");container=p(void 0);isPopoverOpened=!1;markdownHTML="";ngOnInit(){this.init();}ngOnChanges(){this.init();}onPopoverHidden(){this.isPopoverOpened=!1;}onPopoverShown(){this.isPopoverOpened=!0;}init(){let r=this.helpType();if(r==="markdownText"){this.markdownHTML=this.formatMarkdownSupport(E);return;}if(r==="markdownEnhanced"){this.markdownHTML=this.formatMarkdownSupport(z);return;}}formatMarkdownSupport(r){let n="Compatible amb <a href=\"https://ca.wikipedia.org/wiki/Markdown#Exemples_de_sintaxi\" target=\"_blank\" rel=\"noopener noreferrer\">Markdown</a>, que admet:"+this.createMarkdownList(r);return this.supportRelMe()&&(n+="<a href=\"https://docs.joinmastodon.org/user/profile/#verification\" target=\"_blank\" rel=\"noopener noreferrer\">L'enlla\xE7 de verificaci\xF3 de Mastodon</a> tamb\xE9 est\xE0 suportat."),n;}createMarkdownList(r){let n={emphasis:"\xC9mfasi",link:"Enlla\xE7os",newline:"L\xEDnies noves",list:"Llistes",image:"Imatges"};return"<ul>"+r.map(t=>n[t]).filter(t=>t).map(t=>"<li>"+t+"</li>").join("")+"</ul>";}};d(o,"\u0275fac",function(n){return new(n||o)();}),d(o,"\u0275cmp",T({type:o,selectors:[["my-help"]],inputs:{helpTitle:[1,"helpTitle"],helpType:[1,"helpType"],iconName:[1,"iconName"],supportRelMe:[1,"supportRelMe"],title:[1,"title"],tooltipPlacement:[1,"tooltipPlacement"],autoClose:[1,"autoClose"],container:[1,"container"]},features:[_],ngContentSelectors:V,decls:4,vars:7,consts:[["tooltipTemplate",""],["popoverClass","help-popover","type","button",1,"help-tooltip-button","p-0","border-0","mx-1",3,"onHidden","onShown","title","ngbPopover","placement","autoClose","container"],[3,"iconName"],[1,"help-title"],[3,"innerHTML"]],template:function(n,i){if(n&1){let t=k();x(),w(0,A,3,2,"ng-template",null,0,S),f(2,"button",1),y("onHidden",function(){return c(t),u(i.onPopoverHidden());})("onShown",function(){return c(t),u(i.onPopoverShown());}),v(3,"my-global-icon",2),b();}if(n&2){let t=N(1);a(2),s("title",i.title())("ngbPopover",t)("placement",i.tooltipPlacement())("autoClose",i.autoClose())("container",i.container()),C("aria-pressed",i.isPopoverOpened),a(),s("iconName",i.iconName());}},dependencies:[O,R],styles:[`.help-tooltip-button[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%]{color:var(--fg-400);display:inline-block;width:18px;height:18px;line-height:18px}  .help-popover{border:0;min-width:200px;max-width:300px}  .help-popover .popover-body{padding:1rem;border-radius:14px}  .help-popover .popover-body .help-title{display:block;margin-bottom:.5rem;font-size:1.25rem}  .help-popover .popover-body p{margin-bottom:0}  .help-popover .popover-body ul{margin-bottom:0;padding-inline-start:1.25rem}
/*# sourceMappingURL=help.component-YO44KHTK.css.map */`]}));let e=o;return e;})();export{q as a};/**i18n:42440f0a8726af1836b15b193adfd3f46a3ecd983a1ed2a1e05982c4f600c8a1*///# sourceMappingURL=chunk-2XR2VGOA.js.map