decord/source/intl/native/migration.tsx

48 lines
1.5 KiB
TypeScript
Raw Normal View History

// Module ID: 14212
// Function ID: 14213
// Name: migration
// Dependencies: [19, 21, 4574, 576, 4294, 4268, 4270, 1178, 2]
2026-07-24 07:16:23 +00:00
// Exports: IntlLink
2026-07-20 16:05:17 +00:00
// Module 14212 (migration)
import nativeDefault from "native" /* 576 */;
import LinkingDefault from "Linking" /* 4268 */;
import _modDef4270 from "module_4270" /* 4270 */;
import noop from "module_19" /* 19 */;
2026-07-23 10:11:24 +00:00
const require = fn;
const jsx = fn(21).jsx;
const createStyles = fn(4574);
let closure_5 = createStyles.createStyles((arg0) => {
const link = { color: nativeDefault.colors.TEXT_LINK, textDecorationLine: null };
2026-07-20 16:05:17 +00:00
let str = "none";
if (arg0) {
str = "underline";
}
link.textDecorationLine = str;
2026-07-29 08:29:29 +00:00
return { link };
2026-07-20 16:05:17 +00:00
});
const size = fn(2);
const result = size.fileFinishedImporting("intl/native/migration.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export const IntlLink = function IntlLink(children) {
const target = children.target;
2026-08-04 21:03:28 +00:00
if (typeof target === "string") {
2026-07-24 07:16:23 +00:00
let fn = () => {
const obj = LinkingDefault;
return obj.openURL(_modDef4270.sanitizeUrl(target));
2026-07-24 07:16:23 +00:00
};
} else {
fn = target;
2026-08-04 21:03:28 +00:00
if (typeof target === "object") {
2026-07-24 07:16:23 +00:00
fn = target;
if (null != target.onClick) {
fn = target.onClick;
}
}
}
2026-07-29 08:29:29 +00:00
const tmp = target;
const tmp3 = closure_5(noop.useContext(target(4294).AccessibilityPreferencesContext).alwaysShowLinkDecorations);
return jsx(tmp(1178).LegacyText, { accessible: true, accessibilityRole: "link", onPress: fn, style: closure_5(noop.useContext(target(4294).AccessibilityPreferencesContext).alwaysShowLinkDecorations).link, children: children.children });
2026-07-24 07:16:23 +00:00
};