decord/source/design/components/Menu/native/MenuItem.tsx

78 lines
2.2 KiB
TypeScript
Raw Normal View History

2026-07-30 10:14:41 +00:00
// Module ID: 13170
// Function ID: 13171
2026-07-20 16:05:17 +00:00
// Name: MenuItem
2026-07-30 10:14:41 +00:00
// Dependencies: [19, 21, 4189, 13168, 4602, 5213, 5233, 2]
2026-07-20 16:05:17 +00:00
2026-07-30 10:14:41 +00:00
// Module 13170 (MenuItem)
2026-07-29 08:29:29 +00:00
import importAllResult from "noop";
2026-07-23 10:11:24 +00:00
import { jsx } from "jsxProd";
2026-07-29 08:29:29 +00:00
import createCacheKey from "createCacheKey";
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
let c3 = importAllResult;
let closure_5 = createCacheKey.createStyles({ formIcon: { width: 20, height: 20 }, formLabel: { fontSize: 14, fontWeight: "500" } });
2026-07-20 16:05:17 +00:00
const forwardRefResult = importAllResult.forwardRef((action, ref) => {
let IconComponent;
let disabled;
let iconSource;
let label;
let showIconFirst;
let style;
({ label, IconComponent, iconSource, showIconFirst } = action);
if (showIconFirst === undefined) {
showIconFirst = false;
}
({ disabled, style } = action);
if (disabled === undefined) {
disabled = false;
}
2026-07-23 10:11:24 +00:00
action = action.action;
let menuClose;
2026-07-20 16:05:17 +00:00
const tmp = callback();
2026-07-30 10:14:41 +00:00
menuClose = importAllResult.useContext(action(13168).MenuContext).menuClose;
2026-07-20 16:05:17 +00:00
if (null != IconComponent) {
2026-07-29 08:29:29 +00:00
let tmp3 = <IconComponent size="sm" />;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
tmp3 = null;
2026-07-20 16:05:17 +00:00
if (null != iconSource) {
2026-07-29 08:29:29 +00:00
let obj = { source: null, style: null };
obj[0] = iconSource;
obj[1] = tmp.formIcon;
tmp3 = jsx(menuClose(4602), { source: null, style: null });
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
obj = { ref, style, accessibilityRole: "menuitem", disabled, leading: null, trailing: null, label: null, onPress: null };
let tmp10 = null;
2026-07-20 16:05:17 +00:00
if (null != iconSource) {
2026-07-29 08:29:29 +00:00
tmp10 = null;
2026-07-20 16:05:17 +00:00
if (showIconFirst) {
2026-07-29 08:29:29 +00:00
tmp10 = tmp3;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
obj[4] = tmp10;
let tmp11 = null;
2026-07-20 16:05:17 +00:00
if (null != iconSource) {
2026-07-29 08:29:29 +00:00
tmp11 = null;
2026-07-20 16:05:17 +00:00
if (!showIconFirst) {
2026-07-29 08:29:29 +00:00
tmp11 = tmp3;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
obj[5] = tmp11;
let tmp7Result = label;
2026-07-30 10:14:41 +00:00
if (typeof label !== "tee") {
2026-07-29 08:29:29 +00:00
obj = { text: null, style: null };
obj[0] = label;
obj[1] = tmp.formLabel;
tmp7Result = tmp7(menuClose(5233), obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[6] = tmp7Result;
obj[7] = function onPress() {
2026-07-20 16:05:17 +00:00
action();
menuClose();
};
2026-07-29 08:29:29 +00:00
return jsx(menuClose(5213), { ref, style, accessibilityRole: "menuitem", disabled, leading: null, trailing: null, label: null, onPress: null });
2026-07-20 16:05:17 +00:00
});
2026-07-29 08:29:29 +00:00
const result = require("createCacheKey").fileFinishedImporting("design/components/Menu/native/MenuItem.tsx");
2026-07-20 16:05:17 +00:00
export const MenuItem = forwardRefResult;