decord/alpha/source/intl/native/migration.tsx

56 lines
1.8 KiB
TypeScript
Raw Normal View History

// Module ID: 13879
// Function ID: 13880
// Name: migration
// Dependencies: [19, 21, 4845, 576, 4579, 4554, 1930, 1177, 2]
2026-07-24 07:16:23 +00:00
// Exports: IntlLink
2026-07-20 16:05:17 +00:00
// Module 13879 (migration)
import nativeDefault from "native" /* 576 */;
import _modDef1930 from "module_1930" /* 1930 */;
import LinkingDefault from "Linking" /* 4554 */;
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(4845);
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") {
let fn = function k() {
const obj = LinkingDefault;
return obj.openURL(_modDef1930.sanitizeUrl(target));
2026-07-24 07:16:23 +00:00
};
let str = "link";
2026-07-24 07:16:23 +00:00
} else {
str = "link";
2026-07-24 07:16:23 +00:00
fn = target;
2026-08-04 21:03:28 +00:00
if (typeof target === "object") {
str = "link";
2026-07-24 07:16:23 +00:00
fn = target;
if (null != target.onClick) {
({ accessibilityRole, onClick } = target);
if (accessibilityRole == null) {
accessibilityRole = "link";
}
str = accessibilityRole;
fn = onClick;
2026-07-24 07:16:23 +00:00
}
}
}
2026-07-29 08:29:29 +00:00
const tmp = target;
const tmp3 = closure_5(noop.useContext(target(4579).AccessibilityPreferencesContext).alwaysShowLinkDecorations);
return jsx(tmp(1177).LegacyText, { accessible: true, accessibilityRole: str, onPress: fn, style: closure_5(noop.useContext(target(4579).AccessibilityPreferencesContext).alwaysShowLinkDecorations).link, children: children.children });
2026-07-24 07:16:23 +00:00
};