import{C as Q}from"./chunk-YLQIMX27.js";import{a as D}from"./chunk-NIY7P74G.js";import{$a as i,Ac as z,Ae as $,Ba as H,Cb as I,Eb as O,Fa as a,Fb as k,Ga as v,Gb as S,Ha as C,La as x,Na as y,Ra as b,Sa as r,_a as w,bc as E,fc as N,ha as T,ia as g,ib as _,ja as h,jb as u,kb as f,ob as M,vc as R,wb as P,xb as c,ze as L}from"./chunk-4JM6MIZ5.js";import{i as s}from"./chunk-QJQRWPYR.js";var F=(()=>{let t=class t{template;name;constructor(p){this.template=p;}};s(t,"\u0275fac",function(n){return new(n||t)(v(C));}),s(t,"\u0275dir",y({type:t,selectors:[["","ptTemplate",""]],inputs:{name:[0,"ptTemplate","name"]}}));let e=t;return e;})();function j(e,t){}function A(e,t){e&1&&r(0,j,0,0,"ng-template");}function U(e,t){if(e&1&&(_(0,"p"),r(1,A,1,0,null,6),u()),e&2){let o=c(2);a(),i("ngTemplateOutlet",o.preHtmlTemplate);}}function G(e,t){e&1&&f(0,"div",7);}function q(e,t){}function X(e,t){e&1&&r(0,q,0,0,"ng-template");}function B(e,t){if(e&1&&(_(0,"p"),r(1,X,1,0,null,6),u()),e&2){let o=c(2);a(),i("ngTemplateOutlet",o.customHtmlTemplate);}}function J(e,t){if(e&1&&f(0,"p",8),e&2){let o=c(2);i("innerHTML",o.mainHtml,H);}}function K(e,t){e&1&&f(0,"div",7);}function W(e,t){}function Y(e,t){e&1&&r(0,W,0,0,"ng-template");}function Z(e,t){if(e&1&&(_(0,"p"),r(1,Y,1,0,null,6),u()),e&2){let o=c(2);a(),i("ngTemplateOutlet",o.postHtmlTemplate);}}function ee(e,t){if(e&1&&r(0,U,2,1,"p",3)(1,G,1,0,"div",4)(2,B,2,1,"p",3)(3,J,1,1,"p",5)(4,K,1,0,"div",4)(5,Z,2,1,"p",3),e&2){let o=c();i("ngIf",o.preHtmlTemplate),a(),i("ngIf",o.preHtmlTemplate&&(o.customHtmlTemplate||o.mainHtml||o.postHtmlTemplate)),a(),i("ngIf",o.customHtmlTemplate),a(),i("ngIf",o.mainHtml),a(),i("ngIf",(o.customHtmlTemplate||o.mainHtml)&&o.postHtmlTemplate),a(),i("ngIf",o.postHtmlTemplate);}}var _e=(()=>{let t=class t{helpType="custom";tooltipPlacement="right auto";iconName="help";title="Hulp krijgen";autoClose="outside";supportRelMe=!1;templates;isPopoverOpened=!1;mainHtml="";preHtmlTemplate;customHtmlTemplate;postHtmlTemplate;ngOnInit(){this.init();}ngAfterContentInit(){{let p=this.templates.find(n=>n.name==="preHtml");p&&(this.preHtmlTemplate=p.template);}{let p=this.templates.find(n=>n.name==="customHtml");p&&(this.customHtmlTemplate=p.template);}{let p=this.templates.find(n=>n.name==="postHtml");p&&(this.postHtmlTemplate=p.template);}}ngOnChanges(){this.init();}onPopoverHidden(){this.isPopoverOpened=!1;}onPopoverShown(){this.isPopoverOpened=!0;}init(){if(this.helpType==="markdownText"){this.mainHtml=this.formatMarkdownSupport(L);return;}if(this.helpType==="markdownEnhanced"){this.mainHtml=this.formatMarkdownSupport($);return;}}formatMarkdownSupport(p){let n="<a href=\"https://nl.wikipedia.org/wiki/Markdown#Voorbeeld\" target=\"_blank\" rel=\"noopener noreferrer\">Markdown</a> compatibel die het volgende ondersteunt:"+this.createMarkdownList(p);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(p){let n={emphasis:"Nadruk",link:"Links",newline:"Nieuwe lijnen",list:"Lijsten",image:"Afbeeldingen"};return"<ul>"+p.map(l=>n[l]).filter(l=>l).map(l=>"<li>"+l+"</li>").join("")+"</ul>";}};s(t,"\u0275fac",function(n){return new(n||t)();}),s(t,"\u0275cmp",x({type:t,selectors:[["my-help"]],contentQueries:function(n,m,l){if(n&1&&I(l,F,4),n&2){let d;O(d=k())&&(m.templates=d);}},inputs:{helpType:"helpType",tooltipPlacement:"tooltipPlacement",iconName:"iconName",title:"title",autoClose:"autoClose",supportRelMe:[2,"supportRelMe","supportRelMe",N]},features:[b,T],decls:4,vars:6,consts:[["tooltipTemplate",""],["popoverClass","help-popover","type","button",1,"help-tooltip-button","p-0","border-0","mx-1",3,"onHidden","onShown","title","ngbPopover","placement","autoClose"],[3,"iconName"],[4,"ngIf"],["class","mb-2",4,"ngIf"],[3,"innerHTML",4,"ngIf"],[4,"ngTemplateOutlet"],[1,"mb-2"],[3,"innerHTML"]],template:function(n,m){if(n&1){let l=M();r(0,ee,6,6,"ng-template",null,0,E),_(2,"button",1),P("onHidden",function(){return g(l),h(m.onPopoverHidden());})("onShown",function(){return g(l),h(m.onPopoverShown());}),f(3,"my-global-icon",2),u();}if(n&2){let l=S(1);a(2),i("title",m.title)("ngbPopover",l)("placement",m.tooltipPlacement)("autoClose",m.autoClose),w("aria-pressed",m.isPopoverOpened),a(),i("iconName",m.iconName);}},dependencies:[R,z,Q,D],styles:[`.help-tooltip-button[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%]{width:17px;height:17px;line-height:17px;display:inline-block;position:relative;top:-1px;color:var(--fg-400)}[_nghost-%COMP%]     .help-popover{min-width:200px;max-width:300px}[_nghost-%COMP%]     .help-popover .popover-body{padding:10px;font-size:13px;border-radius:3px}[_nghost-%COMP%]     .help-popover .popover-body p{margin-bottom:0}[_nghost-%COMP%]     .help-popover .popover-body ul{margin-bottom:0;padding-inline-start:1.25rem}
/*# sourceMappingURL=help.component-Q4PQMMFH.css.map */`]}));let e=t;return e;})();export{F as a,_e as b};/**i18n:68865f44f2a527c44cf5136a17c76a0ff8308c2bae5c7c8d50070a5fb9847c44*///# sourceMappingURL=chunk-5DDHXOCF.js.map