import{b as W}from"./chunk-C5DTCG7Q.js";import{a as V,b as G}from"./chunk-5FBUB2AC.js";import{D as z,a as O,g as P,n as F}from"./chunk-ZPYT6WL3.js";import{F as q}from"./chunk-UIT7CBMO.js";import{$b as L,Ca as d,Cb as C,Dc as I,Eb as T,Fb as E,Gb as N,Gc as U,Jh as H,Ka as c,Mg as B,Ob as S,Qa as v,Tb as s,Ub as x,X as M,Zb as b,_b as R,aa as h,eb as k,fb as w,fc as D,gb as y,gf as j,hb as g,hf as $,ib as r,jb as p,qa as _,sc as A,yc as m}from"./chunk-6YFOH76E.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:"\u0E1A\u0E23\u0E23\u0E17\u0E31\u0E14\u0E43\u0E2B\u0E21\u0E48",list:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",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-RIVHYAMS.js.map