import{C as Q}from"./chunk-XYUXA3LT.js";import{a as R}from"./chunk-BUPI2ADN.js";import{Ab as k,Ca as m,Ce as z,Da as x,De as $,Ea as y,Kb as S,Na as s,Ua as w,Va as l,Yb as E,ba as T,cb as _,da as H,db as u,eb as f,ib as b,ka as v,la as g,ma as h,qb as P,rb as c,tc as N,wb as M,ya as C,yb as O,yc as L,zb as I}from"./chunk-X3RCWQ3R.js";import{i as o}from"./chunk-SR6RTMQI.js";var D=(()=>{let t=class t{constructor(p){o(this,"template");o(this,"name");this.template=p;}};o(t,"\u0275fac",function(i){return new(i||t)(x(y));}),o(t,"\u0275dir",H({type:t,selectors:[["","ptTemplate",""]],inputs:{name:[0,"ptTemplate","name"]},standalone:!0}));let e=t;return e;})();function V(e,t){}function U(e,t){e&1&&s(0,V,0,0,"ng-template");}function j(e,t){if(e&1&&(_(0,"p"),s(1,U,1,0,null,6),u()),e&2){let n=c(2);m(),l("ngTemplateOutlet",n.preHtmlTemplate);}}function A(e,t){e&1&&f(0,"div",7);}function G(e,t){}function q(e,t){e&1&&s(0,G,0,0,"ng-template");}function X(e,t){if(e&1&&(_(0,"p"),s(1,q,1,0,null,6),u()),e&2){let n=c(2);m(),l("ngTemplateOutlet",n.customHtmlTemplate);}}function B(e,t){if(e&1&&f(0,"p",8),e&2){let n=c(2);l("innerHTML",n.mainHtml,C);}}function J(e,t){e&1&&f(0,"div",7);}function K(e,t){}function W(e,t){e&1&&s(0,K,0,0,"ng-template");}function Y(e,t){if(e&1&&(_(0,"p"),s(1,W,1,0,null,6),u()),e&2){let n=c(2);m(),l("ngTemplateOutlet",n.postHtmlTemplate);}}function Z(e,t){if(e&1&&s(0,j,2,1,"p",3)(1,A,1,0,"div",4)(2,X,2,1,"p",3)(3,B,1,1,"p",5)(4,J,1,0,"div",4)(5,Y,2,1,"p",3),e&2){let n=c();l("ngIf",n.preHtmlTemplate),m(),l("ngIf",n.preHtmlTemplate&&(n.customHtmlTemplate||n.mainHtml||n.postHtmlTemplate)),m(),l("ngIf",n.customHtmlTemplate),m(),l("ngIf",n.mainHtml),m(),l("ngIf",(n.customHtmlTemplate||n.mainHtml)&&n.postHtmlTemplate),m(),l("ngIf",n.postHtmlTemplate);}}var ae=(()=>{let t=class t{constructor(){o(this,"helpType","custom");o(this,"tooltipPlacement","right auto");o(this,"iconName","help");o(this,"title","Hulp krijgen");o(this,"autoClose","outside");o(this,"templates");o(this,"isPopoverOpened",!1);o(this,"mainHtml","");o(this,"preHtmlTemplate");o(this,"customHtmlTemplate");o(this,"postHtmlTemplate");}ngOnInit(){this.init();}ngAfterContentInit(){{let p=this.templates.find(i=>i.name==="preHtml");p&&(this.preHtmlTemplate=p.template);}{let p=this.templates.find(i=>i.name==="customHtml");p&&(this.customHtmlTemplate=p.template);}{let p=this.templates.find(i=>i.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(z);return;}if(this.helpType==="markdownEnhanced"){this.mainHtml=this.formatMarkdownSupport($);return;}}formatMarkdownSupport(p){return"<a href=\"https://nl.wikipedia.org/wiki/Markdown#Voorbeeld\" target=\"_blank\" rel=\"noopener noreferrer\">Markdown</a> compatibel die het volgende ondersteunt:"+this.createMarkdownList(p);}createMarkdownList(p){let i={emphasis:"Nadruk",link:"Links",newline:"Nieuwe lijnen",list:"Lijsten",image:"Afbeeldingen"};return"<ul>"+p.map(a=>i[a]).filter(a=>a).map(a=>"<li>"+a+"</li>").join("")+"</ul>";}};o(t,"\u0275fac",function(i){return new(i||t)();}),o(t,"\u0275cmp",T({type:t,selectors:[["my-help"]],contentQueries:function(i,r,a){if(i&1&&M(a,D,4),i&2){let d;O(d=I())&&(r.templates=d);}},inputs:{helpType:"helpType",tooltipPlacement:"tooltipPlacement",iconName:"iconName",title:"title",autoClose:"autoClose"},standalone:!0,features:[v,S],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(i,r){if(i&1){let a=b();s(0,Z,6,6,"ng-template",null,0,E),_(2,"button",1),P("onHidden",function(){return g(a),h(r.onPopoverHidden());})("onShown",function(){return g(a),h(r.onPopoverShown());}),f(3,"my-global-icon",2),u();}if(i&2){let a=k(1);m(2),l("title",r.title)("ngbPopover",a)("placement",r.tooltipPlacement)("autoClose",r.autoClose),w("aria-pressed",r.isPopoverOpened),m(),l("iconName",r.iconName);}},dependencies:[N,L,Q,R],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{D as a,ae as b};/**i18n:3d16453f213eb5db982e7e7dd90631843ac5d3f860726a614777c3e9e3f9b57e*///# sourceMappingURL=chunk-6I6EA4VV.js.map