import{D as I}from"./chunk-MRVUPFI3.js";import{a as O}from"./chunk-TGGGSUIC.js";import{Bb as M,Cb as m,Da as b,Db as y,Eb as k,Ha as s,Hc as N,Ob as x,Pb as H,Qb as P,Sa as w,We as E,Xe as z,Ya as u,db as T,eb as a,ga as v,ha as d,ia as h,nb as f,nc as L,ob as g,pb as _,sc as S,ta as p,tb as C}from"./chunk-747XQIKV.js";import{i as c}from"./chunk-D3F7ONO7.js";var $=["*"];function V(e,o){if(e&1&&(f(0,"strong",5),H(1),g()),e&2){let l=m(2);s(),P(l.helpTitle());}}function j(e,o){if(e&1&&_(0,"p",6),e&2){let l=m(2);a("innerHTML",l.markdownHTML,b);}}function D(e,o){if(e&1&&(u(0,V,2,1,"strong",3)(1,j,1,1,"p",4),k(2)),e&2){let l=m();a("ngIf",l.helpTitle()),s(),a("ngIf",l.markdownHTML);}}var J=(()=>{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(E);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,D,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:[N,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-SV2SVFUC.css.map */`]}));let e=o;return e;})();export{J as a};/**i18n:6f27118bd781e1b187bee9d5d6ca55c8b3017949bcb9fb3e18a73e038f249d42*///# sourceMappingURL=chunk-ZC752CWL.js.map