import{D as I}from"./chunk-T6AIIPLN.js";import{a as O}from"./chunk-QPR7P2GZ.js";import{Ab as M,Bb as m,Ca as b,Cb as y,Cc as E,Db as k,Ga as s,Le as N,Me as z,Nb as x,Ob as H,Pb as P,Ra as w,Xa as u,cb as T,db as a,fa as v,ga as d,ha as h,ic as L,mb as f,nb as g,nc as S,ob as _,sa as p,sb as C}from"./chunk-7XZKA4JV.js";import{i as c}from"./chunk-ROL33JP2.js";var $=["*"];function D(e,o){if(e&1&&(f(0,"strong",5),H(1),g()),e&2){let l=m(2);s(),P(l.helpTitle());}}function V(e,o){if(e&1&&_(0,"p",6),e&2){let l=m(2);a("innerHTML",l.markdownHTML,b);}}function j(e,o){if(e&1&&(u(0,D,2,1,"strong",3)(1,V,1,1,"p",4),k(2)),e&2){let l=m();a("ngIf",l.helpTitle()),s(),a("ngIf",l.markdownHTML);}}var q=(()=>{let o=class o{helpTitle=p("");helpType=p("custom");iconName=p("help");supportRelMe=p(!1,{transform:S});title=p("Obter 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(N);return;}if(r==="markdownEnhanced"){this.markdownHTML=this.formatMarkdownSupport(z);return;}}formatMarkdownSupport(r){let n="<a href=\"https://pt.wikipedia.org/wiki/Markdown#Exemplos_de_sintaxe\" target=\"_blank\" rel=\"noopener noreferrer\">Markdown</a> compat\xEDvel que suporte:"+this.createMarkdownList(r);return this.supportRelMe()&&(n+="<a href=\"https://docs.joinmastodon.org/user/profile/#verification\" target=\"_blank\" rel=\"noopener noreferrer\">Mastodon verification link</a> is also supported."),n;}createMarkdownList(r){let n={emphasis:"\xCAnfase",link:"Links",newline:"Novas linhas",list:"Listas",image:"Imagens"};return"<ul>"+r.map(t=>n[t]).filter(t=>t).map(t=>"<li>"+t+"</li>").join("")+"</ul>";}};c(o,"\u0275fac",function(n){return new(n||o)();}),c(o,"\u0275cmp",w({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:[v],ngContentSelectors:$,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"],["class","help-title",4,"ngIf"],[3,"innerHTML",4,"ngIf"],[1,"help-title"],[3,"innerHTML"]],template:function(n,i){if(n&1){let t=C();y(),u(0,j,3,2,"ng-template",null,0,L),f(2,"button",1),M("onHidden",function(){return d(t),h(i.onPopoverHidden());})("onShown",function(){return d(t),h(i.onPopoverShown());}),_(3,"my-global-icon",2),g();}if(n&2){let t=x(1);s(2),a("title",i.title())("ngbPopover",t)("placement",i.tooltipPlacement())("autoClose",i.autoClose())("container",i.container()),T("aria-pressed",i.isPopoverOpened),s(),a("iconName",i.iconName());}},dependencies:[E,I,O],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-VC5DJEYD.css.map */`]}));let e=o;return e;})();export{q as a};/**i18n:37786acc6a78281d9fbe29f0e76f79a0df01fc58cd74a91d2d29106b1f1580b1*///# sourceMappingURL=chunk-M2FB7JRB.js.map