import{b as W}from"./chunk-Q6HW2ZX6.js";import{a as V,b as G}from"./chunk-Z6HFTXVJ.js";import{E as z,a as O,g as P,o as F}from"./chunk-GE7DWA6O.js";import{F as q}from"./chunk-LNDL2Z4K.js";import{Da as d,Dc as m,Gb as C,Ib as T,Ic as I,Jb as E,Kb as N,Lc as U,Na as c,Oh as H,Rg as B,Sb as S,Ua as v,Xb as s,Y as M,Yb as x,ba as h,bc as b,cc as R,dc as L,ib as k,jb as w,jc as D,kb as y,lb as g,lf as j,mb as r,mf as $,nb as p,ra as _,wc as A}from"./chunk-MOXUT4EU.js";import{i as l}from"./chunk-QQ7SJNXU.js";var X=["*"];function J(n,e){if(n&1&&(r(0,"li"),s(1),p()),n&2){let f=e.$implicit;d(),x(f);}}function K(n,e){if(n&1&&(s(0," Supported markdown formats: "),r(1,"ul"),w(2,J,2,1,"li",null,k),r(4,"li")(5,"a",2),s(6,"Mastodon verification link"),p()()(),r(7,"a",3),s(8,"Learn more about Markdown"),p()),n&2){let f=T();d(2),y(f.markdownRules);}}var oe=(()=>{let e=class e{helpType=m.required();supportRelMe=m(!1,{transform:U});markdownRules=[];ngOnInit(){this.init();}ngOnChanges(){this.init();}init(){let o=this.helpType();if(o==="markdownText"){this.markdownRules=this.createMarkdownList(j);return;}if(o==="markdownEnhanced"){this.markdownRules=this.createMarkdownList($);return;}}createMarkdownList(o){let i={emphasis:"Emphasis: *text*",link:"Links: [title](https://example.com)",newline:"\xDAj sorok",list:"List\xE1k",image:"Images: ![description](https://example.com/image.png)"};return o.map(t=>i[t]).filter(t=>!!t);}};l(e,"\u0275fac",function(i){return new(i||e)();}),l(e,"\u0275cmp",c({type:e,selectors:[["my-markdown-hint"]],inputs:{helpType:[1,"helpType"],supportRelMe:[1,"supportRelMe"]},features:[_],ngContentSelectors:X,decls:4,vars:1,consts:[["tooltipTemplate",""],[1,"root","fake-link",3,"ngbPopover"],["href","https://docs.joinmastodon.org/user/profile/#verification","target","_blank","rel","noopener noreferrer"],["href","https://wikipedia.org/wiki/Markdown#Example","target","_blank","rel","noopener noreferrer",1,"pt"]],template:function(i,t){if(i&1&&(E(),v(0,K,9,0,"ng-template",null,0,A),r(2,"span",1),N(3),p()),i&2){let u=S(1);d(2),g("ngbPopover",u);}},dependencies:[q],styles:[`.root[_ngcontent-%COMP%]{cursor:help}
/*# sourceMappingURL=markdown-hint.component-IBLCCP7Q.css.map */`]}));let n=e;return n;})();var ce=(()=>{let e=class e{userService=h(H);notifier=h(B);inputName=m(void 0);value=I("");suggestions=[];propagateChange=o=>{};writeValue(o){this.value.set(o);}registerOnChange(o){this.propagateChange=o;}registerOnTouched(){}completeMethod(o){let i=o.query;this.userService.autocomplete(i).subscribe({next:t=>this.suggestions=t,error:t=>this.notifier.handleError(t)});}};l(e,"\u0275fac",function(i){return new(i||e)();}),l(e,"\u0275cmp",c({type:e,selectors:[["my-user-auto-complete"]],inputs:{inputName:[1,"inputName"],value:[1,"value"]},outputs:{value:"valueChange"},features:[D([{provide:O,useExisting:M(()=>e),multi:!0}])],decls:1,vars:3,consts:[["fluid","true",3,"completeMethod","ngModelChange","inputId","suggestions","ngModel"]],template:function(i,t){i&1&&(r(0,"p-autoComplete",0),C("completeMethod",function(a){return t.completeMethod(a);}),L("ngModelChange",function(a){return R(t.value,a)||(t.value=a),a;}),C("ngModelChange",function(a){return t.propagateChange(a);}),p()),i&2&&(g("inputId",t.inputName())("suggestions",t.suggestions),b("ngModel",t.value));},dependencies:[W,z,P,F,G,V],encapsulation:2}));let n=e;return n;})();export{oe as a,ce as b};/**i18n:5a85df092a135682c90bae008e37ec28160e04e5f445e29af2927333ba91ffa1*///# sourceMappingURL=chunk-6TVGZDQG.js.map