import{F as O}from"./chunk-C4Z4PZTH.js";import{a as R}from"./chunk-2WREWCTT.js";import{Bb as y,Da as a,Db as m,Eb as x,Fb as H,Fc as D,La as T,Nb as N,Ra as w,Sb as P,Tb as L,_a as C,ab as h,bb as g,ef as E,fa as c,ff as z,ga as u,gb as s,hb as f,ib as v,jb as b,ra as _,sc as S,tb as k,xc as p,za as M}from"./chunk-DWEAL4OJ.js";import{i as d}from"./chunk-YM6OINSR.js";var V=["*"];function j(e,o){if(e&1&&(f(0,"strong",3),P(1),v()),e&2){let l=m(2);a(),L(l.helpTitle());}}function I(e,o){if(e&1&&b(0,"p",4),e&2){let l=m(2);s("innerHTML",l.markdownHTML,M);}}function U(e,o){if(e&1&&(h(0,j,2,1,"strong",3),h(1,I,1,1,"p",4),H(2)),e&2){let l=m();g(l.helpTitle()?0:-1),a(),g(l.markdownHTML?1:-1);}}var q=(()=>{let o=class o{helpTitle=p("");helpType=p("custom");iconName=p("help");supportRelMe=p(!1,{transform:D});title=p("\u041E\u0442\u0440\u0438\u043C\u0430\u0442\u0438 \u0434\u043E\u043F\u043E\u043C\u043E\u0433\u0443");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://en.wikipedia.org/wiki/Markdown#Example\" target=\"_blank\" rel=\"noopener noreferrer\">Markdown</a>-\u0441\u0443\u043C\u0456\u0441\u043D\u0438\u0439, \u0449\u043E \u043F\u0456\u0434\u0442\u0440\u0438\u043C\u0443\u0454:"+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:"\u041F\u0456\u0434\u043A\u0440\u0435\u0441\u043B\u0435\u043D\u043D\u044F",link:"\u041F\u043E\u0441\u0438\u043B\u0430\u043D\u043D\u044F",newline:"\u041D\u043E\u0432\u0456 \u0440\u044F\u0434\u043A\u0438",list:"\u0421\u043F\u0438\u0441\u043A\u0438",image:"\u0417\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F"};return"<ul>"+r.map(t=>n[t]).filter(t=>t).map(t=>"<li>"+t+"</li>").join("")+"</ul>";}};d(o,"\u0275fac",function(n){return new(n||o)();}),d(o,"\u0275cmp",T({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:[_],ngContentSelectors:V,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(n,i){if(n&1){let t=k();x(),w(0,U,3,2,"ng-template",null,0,S),f(2,"button",1),y("onHidden",function(){return c(t),u(i.onPopoverHidden());})("onShown",function(){return c(t),u(i.onPopoverShown());}),b(3,"my-global-icon",2),v();}if(n&2){let t=N(1);a(2),s("title",i.title())("ngbPopover",t)("placement",i.tooltipPlacement())("autoClose",i.autoClose())("container",i.container()),C("aria-pressed",i.isPopoverOpened),a(),s("iconName",i.iconName());}},dependencies:[O,R],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{q as a};/**i18n:5a85df092a135682c90bae008e37ec28160e04e5f445e29af2927333ba91ffa1*///# sourceMappingURL=chunk-WZAWUQR2.js.map