import{D as I}from"./chunk-V2M57NO3.js";import{a as O}from"./chunk-L4RULAQQ.js";import{Da as b,Db as C,Eb as m,Fb as M,Fc as N,Gb as k,Ha as s,Me as E,Ne as z,Qb as H,Rb as x,Sa as w,Sb as P,Za as u,fb as T,ga as _,gb as a,ha as d,ia as h,lc as L,pb as f,pc as S,qb as g,rb as v,ta as r,vb as y}from"./chunk-7W5IJG57.js";import{i as c}from"./chunk-RB5FWREQ.js";var $=["*"];function U(e,o){if(e&1&&(f(0,"strong",5),x(1),g()),e&2){let l=m(2);s(),P(l.helpTitle());}}function V(e,o){if(e&1&&v(0,"p",6),e&2){let l=m(2);a("innerHTML",l.markdownHTML,b);}}function j(e,o){if(e&1&&(u(0,U,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 B=(()=>{let o=class o{helpTitle=r("");helpType=r("custom");iconName=r("help");supportRelMe=r(!1,{transform:S});title=r("F\xE1 a\xF0sto\xF0");tooltipPlacement=r("right auto");autoClose=r("outside");container=r(void 0);isPopoverOpened=!1;markdownHTML="";ngOnInit(){this.init();}ngOnChanges(){this.init();}onPopoverHidden(){this.isPopoverOpened=!1;}onPopoverShown(){this.isPopoverOpened=!0;}init(){let p=this.helpType();if(p==="markdownText"){this.markdownHTML=this.formatMarkdownSupport(E);return;}if(p==="markdownEnhanced"){this.markdownHTML=this.formatMarkdownSupport(z);return;}}formatMarkdownSupport(p){let n="<a href=\"https://en.wikipedia.org/wiki/Markdown#Example\" target=\"_blank\" rel=\"noopener noreferrer\">Markdown</a> samh\xE6ft sem sty\xF0ur:"+this.createMarkdownList(p);return this.supportRelMe()&&(n+="<a href=\"https://docs.joinmastodon.org/user/profile/#verification\" target=\"_blank\" rel=\"noopener noreferrer\">Sta\xF0festingartengill Mastodon</a> er einnig studdur."),n;}createMarkdownList(p){let n={emphasis:"\xC1hersla",link:"Tengla",newline:"N\xFDjar l\xEDnur",list:"Listar",image:"Myndir"};return"<ul>"+p.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:[_],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=y();M(),u(0,j,3,2,"ng-template",null,0,L),f(2,"button",1),C("onHidden",function(){return d(t),h(i.onPopoverHidden());})("onShown",function(){return d(t),h(i.onPopoverShown());}),v(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{--bs-popover-bg: var(--bg-secondary-450);border:0;min-width:200px;max-width:300px}  .help-popover .popover-body{padding:1rem;border-radius:14px;color:var(--fg-200)}  .help-popover .popover-body .help-title{display:block;margin-bottom:.5rem;color:var(--fg-450);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-UWUTPHXP.css.map */`]}));let e=o;return e;})();export{B as a};/**i18n:3558f4fa3a6acf6a8a484a0589828971efacd00f9f89386e64ec00a5fc269cc5*///# sourceMappingURL=chunk-QEMOOM5D.js.map