import{D as I}from"./chunk-6B2INHH4.js";import{a as O}from"./chunk-JRT5Q4WM.js";import{Ab as M,Bb as m,Ca as b,Cb as y,Cc as N,Db as k,Ga as s,Nb as x,Ne as E,Ob as H,Oe as z,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-IDYB4NXF.js";import{i as c}from"./chunk-AI7IVZV2.js";var $=["*"];function V(e,o){if(e&1&&(f(0,"strong",5),H(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 J=(()=>{let o=class o{helpTitle=p("");helpType=p("custom");iconName=p("help");supportRelMe=p(!1,{transform:S});title=p("Faigh cobhair");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="Co-ch\xF2rdail ri <a href=\"https://en.wikipedia.org/wiki/Markdown#Example\" target=\"_blank\" rel=\"noopener noreferrer\">Markdown</a> a chuireas taic ri:"+this.createMarkdownList(r);return this.supportRelMe()&&(n+="Tha taic ri <a href=\"https://docs.joinmastodon.org/user/profile/#verification\" target=\"_blank\" rel=\"noopener noreferrer\">Mastodon verification link</a> cuideachd."),n;}createMarkdownList(r){let n={emphasis:"Cudrom",link:"Ceanglaichean",newline:"Loidhnichean \xF9ra",list:"Liostaichean",image:"Dealbhan"};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=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:[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-SV2SVFUC.css.map */`]}));let e=o;return e;})();export{J as a};/**i18n:1cf7c077143c4c267fdafbe5508f191afcef21bad6aba22a3a8dc180e1003753*///# sourceMappingURL=chunk-QBF47466.js.map