import{F as O}from"./chunk-IX3C5NWZ.js";import{a as R}from"./chunk-KLWYGBZ6.js";import{$a as g,Aa as a,Bb as m,Cb as x,Db as H,Fc as D,Ka as T,Lb as N,Qa as w,Qb as P,Rb as L,Ya as C,_a as h,cf as E,df as z,eb as s,fa as c,fb as f,ga as u,gb as b,hb as v,oa as _,qc as S,rb as k,wa as M,yc as p,zb as y}from"./chunk-W6R7I2TH.js";import{i as d}from"./chunk-PTJGHD3V.js";var V=["*"];function j(e,o){if(e&1&&(f(0,"strong",3),P(1),b()),e&2){let l=m(2);a(),L(l.helpTitle());}}function I(e,o){if(e&1&&v(0,"p",4),e&2){let l=m(2);s("innerHTML",l.markdownHTML,M);}}function A(e,o){if(e&1&&(h(0,j,2,1,"strong",3),h(1,I,1,1,"p",4),H(2)),e&2){let l=m();g(l.helpTitle()?0:-1),a(),g(l.markdownHTML?1:-1);}}var q=(()=>{let o=class o{helpTitle=p("");helpType=p("custom");iconName=p("help");supportRelMe=p(!1,{transform:D});title=p("Xem tr\u1EE3 gi\xFAp");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="H\u1ED7 tr\u1EE3 \u0111\u1ECBnh d\u1EA1ng <a href=\"https://en.wikipedia.org/wiki/Markdown#Example\" target=\"_blank\" rel=\"noopener noreferrer\">Markdown</a>:"+this.createMarkdownList(r);return this.supportRelMe()&&(n+="<a href=\"https://docs.joinmastodon.org/user/profile/#verification\" target=\"_blank\" rel=\"noopener noreferrer\">X\xE1c minh li\xEAn k\u1EBFt Mastodon</a> c\u0169ng c\xF3 h\u1ED7 tr\u1EE3."),n;}createMarkdownList(r){let n={emphasis:"Nh\u1EA5n m\u1EA1nh",link:"Li\xEAn k\u1EBFt",newline:"Xu\u1ED1ng d\xF2ng",list:"Li\u1EC7t k\xEA",image:"H\xECnh \u1EA3nh"};return"<ul>"+r.map(t=>n[t]).filter(t=>t).map(t=>"<li>"+t+"</li>").join("")+"</ul>";}};d(o,"\u0275fac",function(n){return new(n||o)();}),d(o,"\u0275cmp",T({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:V,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(n,i){if(n&1){let t=k();x(),w(0,A,3,2,"ng-template",null,0,S),f(2,"button",1),y("onHidden",function(){return c(t),u(i.onPopoverHidden());})("onShown",function(){return c(t),u(i.onPopoverShown());}),v(3,"my-global-icon",2),b();}if(n&2){let t=N(1);a(2),s("title",i.title())("ngbPopover",t)("placement",i.tooltipPlacement())("autoClose",i.autoClose())("container",i.container()),C("aria-pressed",i.isPopoverOpened),a(),s("iconName",i.iconName());}},dependencies:[O,R],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-YO44KHTK.css.map */`]}));let e=o;return e;})();export{q as a};/**i18n:90f1dd82a779b57eddc91ef20913c88eecaa9632bba8ac04ad50f47ae2b82df7*///# sourceMappingURL=chunk-M47TE5K7.js.map