decord/source/modules/profile_customization/native/BioText.tsx

125 lines
4.1 KiB
TypeScript
Raw Normal View History

2026-08-12 06:57:52 +00:00
// Module ID: 9577
// Function ID: 9578
2026-07-20 16:05:17 +00:00
// Name: LinkButton
2026-08-12 06:57:52 +00:00
// Dependencies: [19, 17, 676, 1978, 21, 4344, 4058, 698, 4340, 9578, 500, 1977, 1236, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-12 06:57:52 +00:00
// Module 9577 (LinkButton)
2026-07-29 08:29:29 +00:00
import noop from "noop";
2026-07-23 10:11:24 +00:00
import { Pressable } from "get ActivityIndicator";
import { AnalyticEvents } from "ME";
import { CHANGELOG_URL } from "CHANGELOG_MODAL_KEY";
import jsxProd from "jsxProd";
2026-07-29 08:29:29 +00:00
import createCacheKey from "createCacheKey";
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
let c9;
let error;
let metroImportAll;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-20 16:05:17 +00:00
function LinkButton(arg0) {
let lineClamp;
let text;
({ lineClamp, text } = arg0);
const tmp = callback3();
2026-07-23 10:11:24 +00:00
obj = {
2026-07-20 16:05:17 +00:00
onPress() {
2026-08-12 06:57:52 +00:00
let obj = callback(4058);
2026-07-29 08:29:29 +00:00
obj.openURL(closure_6);
obj = { cta_type: "profile_bio", target: closure_6 };
callback(698).track(constants.CHANGE_LOG_CTA_CLICKED, obj);
2026-07-20 16:05:17 +00:00
},
style: tmp.link,
2026-08-12 06:57:52 +00:00
children: callback(require(4340) /* Text */.Text, obj)
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
obj = { variant: "text-md/normal", color: "text-link", lineClamp, style: tmp.link, children: items };
items = ["\n", text];
2026-07-20 16:05:17 +00:00
return callback2(Pressable, obj);
}
2026-07-29 08:29:29 +00:00
({ jsxs: error, jsx: metroImportAll, Fragment: c9 } = jsxProd);
let closure_10 = createCacheKey.createStyles({ text: { alignSelf: "stretch", textAlignVertical: "top", width: "100%", flexGrow: 1, paddingTop: 2, lineHeight: 24 }, span: { alignSelf: "stretch", textAlignVertical: "bottom", width: "100%", flexGrow: 1, display: "flex", paddingBottom: 2 }, link: { alignSelf: "stretch", textAlignVertical: "bottom", width: "100%", flexGrow: 1, bottom: -4, position: "relative" } });
2026-07-23 10:11:24 +00:00
const result = require("ME").fileFinishedImporting("modules/profile_customization/native/BioText.tsx");
2026-07-20 16:05:17 +00:00
export default function BioText(lineClamp) {
let bio;
let placeholder;
let textVariant;
let userId;
({ placeholder, bio } = lineClamp);
lineClamp = lineClamp.lineClamp;
({ userId, textVariant } = lineClamp);
if (textVariant === undefined) {
textVariant = "text-md/normal";
}
const tmp = callback3();
const items = [bio, textVariant];
let memo = React.useMemo(() => {
let obj = bio(textVariant[9]);
2026-07-29 08:29:29 +00:00
obj = { linkVariant: textVariant, textVariant, customEmojiOffsetY: null };
2026-07-20 16:05:17 +00:00
let num;
if (obj3.isAndroid()) {
num = 3;
}
2026-07-29 08:29:29 +00:00
obj[2] = num;
2026-07-20 16:05:17 +00:00
return obj.parseBioReact(bio, undefined, obj);
}, items);
let tmp3 = 0 === bio.length;
if (tmp3) {
2026-07-23 10:11:24 +00:00
tmp3 = !lineClamp(textVariant[11])(userId);
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
if (lineClamp(textVariant[11])(userId)) {
2026-07-29 08:29:29 +00:00
let obj = { variant: null, color: null, lineClamp: null, style: null, children: null };
obj[0] = textVariant;
2026-07-20 16:05:17 +00:00
let str2 = "text-default";
let str3 = "text-default";
if (tmp3) {
str3 = "text-muted";
}
2026-07-29 08:29:29 +00:00
obj[1] = str3;
obj[2] = lineClamp;
obj[3] = tmp.text;
const intl = tmp12(tmp6[12]).intl;
const items1 = [intl.string(bio(tmp6[12]).t.OJmNR9), "\n"];
obj[4] = items1;
const items2 = [closure_7(bio(tmp6[8]).Text, obj, "changelog-bio"), ];
obj = { variant: null, color: null, lineClamp: null, style: null, children: null };
obj[0] = textVariant;
2026-07-20 16:05:17 +00:00
if (tmp3) {
str2 = "text-muted";
}
2026-07-29 08:29:29 +00:00
const obj1 = { children: null };
obj[1] = str2;
obj[2] = lineClamp;
obj[3] = tmp.span;
const intl2 = tmp12(tmp6[12]).intl;
const obj2 = { blogHook: null };
obj2[0] = function blogHook(text) {
return outer1_8(outer1_11, { lineClamp, text }, arg1);
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
obj[4] = intl2.format(bio(tmp6[12]).t.RCYeBL, obj2);
items2[1] = closure_8(bio(tmp6[8]).Text, obj, "changelog-cta");
obj1[0] = items2;
let tmp8Result = tmp10(closure_9, obj1);
2026-07-20 16:05:17 +00:00
const tmp11 = closure_9;
2026-07-29 08:29:29 +00:00
const tmp13 = closure_8;
2026-07-20 16:05:17 +00:00
} else if (!tmp3) {
2026-07-29 08:29:29 +00:00
obj = { variant: null, color: null, lineClamp: null, style: null, children: null };
obj[0] = textVariant;
2026-07-20 16:05:17 +00:00
let str = "text-default";
if (tmp3) {
str = "text-muted";
}
2026-07-29 08:29:29 +00:00
obj[1] = str;
obj[2] = lineClamp;
obj[3] = tmp.text;
2026-07-20 16:05:17 +00:00
if (tmp3) {
memo = placeholder;
}
2026-07-29 08:29:29 +00:00
obj[4] = memo;
tmp8Result = closure_8(bio(tmp6[8]).Text, obj);
const tmp8 = closure_8;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
tmp8Result = null;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp8Result;
2026-07-20 16:05:17 +00:00
};