import{F as D}from"./chunk-TNCGHY53.js";import{a as E}from"./chunk-MUVDKD7T.js";import{Da as a,Ec as p,Hb as C,Jb as m,Kb as w,Lb as k,Mc as P,Na as _,Tb as y,Ua as M,Yb as x,Zb as H,cb as T,gb as c,hb as u,mb as s,nb as h,nf as L,ob as g,of as S,pb as f,ra as v,xc as N,za as b}from"./chunk-DZBHF6HI.js";import{i as d}from"./chunk-IQVXR75E.js";var z=["*"];function O(e,o){if(e&1&&(h(0,"strong",3),x(1),g()),e&2){let r=m(2);a(),H(r.helpTitle());}}function R(e,o){if(e&1&&f(0,"p",4),e&2){let r=m(2);s("innerHTML",r.markdownHTML,b);}}function $(e,o){if(e&1&&(c(0,O,2,1,"strong",3),c(1,R,1,1,"p",4),k(2)),e&2){let r=m();u(r.helpTitle()?0:-1),a(),u(r.markdownHTML?1:-1);}}var K=(()=>{let o=class o{helpTitle=p("");helpType=p("custom");iconName=p("help");supportRelMe=p(!1,{transform:P});title=p("\u0E02\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E0A\u0E48\u0E27\u0E22\u0E40\u0E2B\u0E25\u0E37\u0E2D");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 l=this.helpType();if(l==="markdownText"){this.markdownHTML=this.formatMarkdownSupport(L);return;}if(l==="markdownEnhanced"){this.markdownHTML=this.formatMarkdownSupport(S);return;}}formatMarkdownSupport(l){let t="\u0E23\u0E2D\u0E07\u0E23\u0E31\u0E1A <a href=\"https://en.wikipedia.org/wiki/Markdown#Example\" target=\"_blank\" rel=\"noopener noreferrer\">Markdown</a> \u0E15\u0E32\u0E21\u0E14\u0E49\u0E32\u0E19\u0E25\u0E48\u0E32\u0E07:"+this.createMarkdownList(l);return this.supportRelMe()&&(t+="\u0E23\u0E2D\u0E07\u0E23\u0E31\u0E1A<a href=\"https://docs.joinmastodon.org/user/profile/#verification\" target=\"_blank\" rel=\"noopener noreferrer\">\u0E25\u0E34\u0E07\u0E01\u0E4C\u0E01\u0E32\u0E23\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19 Mastodon</a> \u0E14\u0E49\u0E27\u0E22\u0E40\u0E0A\u0E48\u0E19\u0E01\u0E31\u0E19"),t;}createMarkdownList(l){let t={emphasis:"\u0E40\u0E19\u0E49\u0E19",link:"\u0E25\u0E34\u0E07\u0E01\u0E4C",newline:"\u0E1A\u0E23\u0E23\u0E17\u0E31\u0E14\u0E43\u0E2B\u0E21\u0E48",list:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",image:"\u0E23\u0E39\u0E1B\u0E20\u0E32\u0E1E"};return"<ul>"+l.map(i=>t[i]).filter(i=>i).map(i=>"<li>"+i+"</li>").join("")+"</ul>";}};d(o,"\u0275fac",function(t){return new(t||o)();}),d(o,"\u0275cmp",_({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:z,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(t,n){if(t&1&&(w(),M(0,$,3,2,"ng-template",null,0,N),h(2,"button",1),C("onHidden",function(){return n.onPopoverHidden();})("onShown",function(){return n.onPopoverShown();}),f(3,"my-global-icon",2),g()),t&2){let i=y(1);a(2),s("title",n.title())("ngbPopover",i)("placement",n.tooltipPlacement())("autoClose",n.autoClose())("container",n.container()),T("aria-pressed",n.isPopoverOpened),a(),s("iconName",n.iconName());}},dependencies:[D,E],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{K as a};/**i18n:347eeb695970c32bc275618edc2e751c67145d9fc3012e70543c114a99b9e016*///# sourceMappingURL=chunk-ZRPU55OY.js.map