import{D as I}from"./chunk-YGZDCBSD.js";import{a as O}from"./chunk-NVRIF56Y.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-XBTZE2EC.js";import{i as c}from"./chunk-WHYNGVB3.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("\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 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="\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(r);return this.supportRelMe()&&(n+="\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"),n;}createMarkdownList(r){let n={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>"+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:56bde403ffba090cdb11aaac0f86ffb9ae7c2bab95df4b44d5dba510264fcf4f*///# sourceMappingURL=chunk-PA2YIUJZ.js.map