import{D as I}from"./chunk-SIHEBH6V.js";import{a as O}from"./chunk-IM5O2N5E.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 H,Pb as x,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-EWB56PWF.js";import{i as c}from"./chunk-2T7OYDCL.js";var $=["*"];function V(e,o){if(e&1&&(f(0,"strong",5),x(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 q=(()=>{let o=class o{helpTitle=p("");helpType=p("custom");iconName=p("help");supportRelMe=p(!1,{transform:S});title=p("\u041F\u043E\u043C\u043E\u0449\u044C");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://ru.wikipedia.org/wiki/Markdown#\u041F\u0440\u0438\u043C\u0435\u0440\u044B_\u0441\u0438\u043D\u0442\u0430\u043A\u0441\u0438\u0441\u0430\" target=\"_blank\" rel=\"noopener noreferrer\">Markdown</a> \u0441\u043E\u0432\u043C\u0435\u0441\u0442\u0438\u043C\u044B\u0439 \u0447\u0442\u043E \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442:"+this.createMarkdownList(r);return this.supportRelMe()&&(n+="<a href=\"https://docs.joinmastodon.org/user/profile/#verification\" target=\"_blank\" rel=\"noopener noreferrer\">\u0421\u0441\u044B\u043B\u043A\u0430 \u0434\u043B\u044F \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 Mastodon</a> \u0442\u0430\u043A \u0436\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F."),n;}createMarkdownList(r){let n={emphasis:"\u041F\u043E\u0434\u0447\u0435\u0440\u043A\u0438\u0432\u0430\u043D\u0438\u0435",link:"\u0421\u0441\u044B\u043B\u043A\u0438",newline:"\u041D\u043E\u0432\u044B\u0435 \u0441\u0442\u0440\u043E\u043A\u0438",list:"\u0421\u043F\u0438\u0441\u043A\u0438",image:"\u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F"};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=H(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-45YH6ZCS.css.map */`]}));let e=o;return e;})();export{q as a};/**i18n:85d030b7fdd36d163c6d41dcef9178681a6baa573eb199e8b12fe27dbb057a98*///# sourceMappingURL=chunk-GAE2J7EH.js.map