import{Ar as Tu,Bn as Ow,Eo as kb,Ga as g$,Go as m5,Gr as Va,Ia as f$,Is as rh,Ls as rx,Lt as Im,Pa as eh,Pi as _M,Q as EV,Qi as bV,Za as gx,_s as ph,as as oA,ec as th,fo as ih,ga as ci,ho as j$,it as FB,ss as oh,vc as wp}from"./chunk-B_pj7Jpm.js";import{t as X1}from"./chunk-CgIzqGPc.js";import{p as Lp}from"./chunk-CR0lnyBO.js";var L=[`*`];function O(o,t){if(o&1&&(wp(0,`strong`,3),j$(1),kb()),o&2){let e=f$(2);FB(),oA(e.helpTitle())}}function E(o,t){if(o&1&&th(0,`p`,4),o&2)gx(`innerHTML`,f$(2).markdownHTML,Ow)}function z(o,t){if(o&1&&(EV(0,O,2,1,`strong`,3),EV(1,E,1,1,`p`,4),ih(2)),o&2){let e=f$();bV(e.helpTitle()?0:-1),FB(),bV(e.markdownHTML?1:-1)}}var S=class o{helpTitle=ph(``);helpType=ph(`custom`);iconName=ph(`help`);supportRelMe=ph(!1,{transform:Tu});title=ph("Uzyskaj pomoc");tooltipPlacement=ph(`right auto`);autoClose=ph(`outside`);container=ph(void 0);isPopoverOpened=!1;markdownHTML=``;ngOnInit(){this.init()}ngOnChanges(){this.init()}onPopoverHidden(){this.isPopoverOpened=!1}onPopoverShown(){this.isPopoverOpened=!0}init(){let t=this.helpType();if(t===`markdownText`){this.markdownHTML=this.formatMarkdownSupport(Im);return}if(t===`markdownEnhanced`){this.markdownHTML=this.formatMarkdownSupport(_M);return}}formatMarkdownSupport(t){let e="Kompatybilny z <a href=\"https://en.wikipedia.org/wiki/Markdown#Example\" target=\"_blank\" rel=\"noopener noreferrer\">Markdown</a>, obsługującym:"+this.createMarkdownList(t);return this.supportRelMe()&&(e+="<a href=\"https://docs.joinmastodon.org/user/profile/#verification\" target=\"_blank\" rel=\"noopener noreferrer\">Link weryfikacyjny do Mastodona</a> jest także wspierany."),e}createMarkdownList(t){let e={emphasis:"Wyróżnienia",link:"Odnośniki",newline:"Nowe linie",list:"Listy",image:"Obrazy"};return`<ul>`+t.map(i=>e[i]).filter(i=>i).map(i=>`<li>`+i+`</li>`).join(``)+`</ul>`}static ɵfac=function(e){return new(e||o)};static ɵcmp=Va({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:[ci],ngContentSelectors:L,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`],[1,`help-title`],[3,`innerHTML`]],template:function(e,n){if(e&1&&(oh(),rx(0,z,3,2,`ng-template`,null,0,m5),wp(2,`button`,1),rh(`onHidden`,function(){return n.onPopoverHidden()})(`onShown`,function(){return n.onPopoverShown()}),th(3,`my-global-icon`,2),kb()),e&2){let i=g$(1);FB(2),gx(`title`,n.title())(`ngbPopover`,i)(`placement`,n.tooltipPlacement())(`autoClose`,n.autoClose())(`container`,n.container()),eh(`aria-pressed`,n.isPopoverOpened),FB(),gx(`iconName`,n.iconName())}},dependencies:[Lp,X1],styles:[`.help-tooltip-button[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%]{color:var(--%NS%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}`],changeDetection:1})};export{S as t};
//# debugId=bc6dbe4e-66db-501e-bdb8-1b96c0b436e2
//# sourceMappingURL=chunk-1IezKpCQ.js.map