1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.join = exports.mention = exports.link = exports.pre = exports.code = exports.underline = exports.strikethrough = exports.spoiler = exports.italic = exports.bold = exports.fmt = exports.FmtString = void 0;
|
4 | const formatting_1 = require("./core/helpers/formatting");
|
5 | Object.defineProperty(exports, "FmtString", { enumerable: true, get: function () { return formatting_1.FmtString; } });
|
6 | Object.defineProperty(exports, "join", { enumerable: true, get: function () { return formatting_1.join; } });
|
7 | const fmt = (0, formatting_1._fmt)();
|
8 | exports.fmt = fmt;
|
9 | const bold = (0, formatting_1._fmt)('bold');
|
10 | exports.bold = bold;
|
11 | const italic = (0, formatting_1._fmt)('italic');
|
12 | exports.italic = italic;
|
13 | const spoiler = (0, formatting_1._fmt)('spoiler');
|
14 | exports.spoiler = spoiler;
|
15 | const strikethrough = (0, formatting_1._fmt)('strikethrough');
|
16 | exports.strikethrough = strikethrough;
|
17 | const underline = (0, formatting_1._fmt)('underline');
|
18 | exports.underline = underline;
|
19 | const code = (0, formatting_1._fmt)('code');
|
20 | exports.code = code;
|
21 | const pre = (language) => (0, formatting_1._fmt)('pre', { language });
|
22 | exports.pre = pre;
|
23 | const link = (content, url) => (0, formatting_1.linkOrMention)(content, { type: 'text_link', url });
|
24 | exports.link = link;
|
25 | const mention = (name, user) => typeof user === 'number'
|
26 | ? link(name, 'tg://user?id=' + user)
|
27 | : (0, formatting_1.linkOrMention)(name, { type: 'text_mention', user });
|
28 | exports.mention = mention;
|