import{Fn as MV,Gn as NV,Ki as _5,Kr as Tu,Kt as Hw,Na as eh,Ns as rh,Sc as x$,Un as NM,X as D$,Xo as lx,Zi as aA,Zs as th,_s as ph,en as Im,go as ih,gt as Ex,k as Bb,ls as oh,n as $B,nn as J$,s as $a,ya as ci,yc as wp}from"./chunk-b0nJCs5_.js";import{t as X1}from"./chunk-CDRFWLLW.js";import{p as Lp}from"./chunk-DcB590Yc.js";var L=[`*`];function O(o,t){if(o&1&&(wp(0,`strong`,3),J$(1),Bb()),o&2){let e=D$(2);$B(),aA(e.helpTitle())}}function E(o,t){if(o&1&&th(0,`p`,4),o&2)Ex(`innerHTML`,D$(2).markdownHTML,Hw)}function z(o,t){if(o&1&&(NV(0,O,2,1,`strong`,3),NV(1,E,1,1,`p`,4),ih(2)),o&2){let e=D$();MV(e.helpTitle()?0:-1),$B(),MV(e.markdownHTML?1:-1)}}var S=class o{helpTitle=ph(``);helpType=ph(`custom`);iconName=ph(`help`);supportRelMe=ph(!1,{transform:Tu});title=ph("Obtenha ajuda");tooltipPlacement=ph(`right auto`);autoClose=ph(`outside`);container=ph(void 0);isPopoverOpened=!1;markdownHTML=``;ngOnInit(){this.init()}ngOnChanges(){this.init()}onPopoverHidden(){this.isPopoverOpened=!1}onPopoverShown(){this.isPopoverOpened=!0}init(){let t=this.helpType();if(t===`markdownText`){this.markdownHTML=this.formatMarkdownSupport(Im);return}if(t===`markdownEnhanced`){this.markdownHTML=this.formatMarkdownSupport(NM);return}}formatMarkdownSupport(t){let e="<a href=\"https://en.wikipedia.org/wiki/Markdown#Example\" target=\"_blank\" rel=\"noopener noreferrer\">Markdown</a> compatíveis que suportam:"+this.createMarkdownList(t);return this.supportRelMe()&&(e+="<a href=\"https://docs.joinmastodon.org/user/profile/#verification\" target=\"_blank\" rel=\"noopener noreferrer\">O link de verificação do Mastodon</a> também é suportado."),e}createMarkdownList(t){let e={emphasis:"Ênfase",link:"Links",newline:"Novas linhas",list:"Listas",image:"Imagens"};return`<ul>`+t.map(i=>e[i]).filter(i=>i).map(i=>`<li>`+i+`</li>`).join(``)+`</ul>`}static ɵfac=function(e){return new(e||o)};static ɵcmp=$a({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:[ci],ngContentSelectors:L,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(e,n){if(e&1&&(oh(),lx(0,z,3,2,`ng-template`,null,0,_5),wp(2,`button`,1),rh(`onHidden`,function(){return n.onPopoverHidden()})(`onShown`,function(){return n.onPopoverShown()}),th(3,`my-global-icon`,2),Bb()),e&2){let i=x$(1);$B(2),Ex(`title`,n.title())(`ngbPopover`,i)(`placement`,n.tooltipPlacement())(`autoClose`,n.autoClose())(`container`,n.container()),eh(`aria-pressed`,n.isPopoverOpened),$B(),Ex(`iconName`,n.iconName())}},dependencies:[Lp,X1],styles:[`.help-tooltip-button[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%]{color:var(--%NS%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}`],changeDetection:1})};export{S as t};
//# debugId=58157127-1a3e-5709-99d4-a0f27a7f9210
//# sourceMappingURL=chunk-BvsfL09w.js.map