decord/source/modules/media_keyboard/native/useMediaKeyboardItemsPerRow.tsx

39 lines
1.3 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 9907
// Function ID: 9908
2026-07-20 16:05:17 +00:00
// Name: useMediaKeyboardItemsPerRow
2026-08-05 07:35:12 +00:00
// Dependencies: [19, 4110, 2]
2026-07-20 16:05:17 +00:00
// Exports: useMediaKeyboardItemsPerRow
2026-08-05 07:35:12 +00:00
// Module 9907 (useMediaKeyboardItemsPerRow)
2026-07-29 08:29:29 +00:00
import noop from "noop";
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
const result = require("set").fileFinishedImporting("modules/media_keyboard/native/useMediaKeyboardItemsPerRow.tsx");
2026-07-20 16:05:17 +00:00
export const useMediaKeyboardItemsPerRow = function useMediaKeyboardItemsPerRow() {
2026-08-05 07:35:12 +00:00
const tmp2 = itemsPageSizeRef(4110)();
2026-07-29 08:29:29 +00:00
let itemsPerRow = 8;
2026-08-05 07:35:12 +00:00
if (itemsPerRow(4110).WindowSizeClassifier.XLARGE !== tmp2) {
2026-07-29 08:29:29 +00:00
itemsPerRow = 6;
2026-08-05 07:35:12 +00:00
if (tmp3(4110).WindowSizeClassifier.LARGE !== tmp2) {
2026-07-29 08:29:29 +00:00
itemsPerRow = 4;
2026-08-05 07:35:12 +00:00
if (tmp3(4110).WindowSizeClassifier.NORMAL !== tmp2) {
2026-07-29 08:29:29 +00:00
itemsPerRow = 3;
2026-08-05 07:35:12 +00:00
if (tmp3(4110).WindowSizeClassifier.SMALL !== tmp2) {
2026-07-20 16:05:17 +00:00
const _Error = Error;
const _HermesInternal = HermesInternal;
2026-07-29 08:29:29 +00:00
const error = new Error("Unknown window size classifier: " + tmp2);
2026-07-20 16:05:17 +00:00
throw error;
}
}
}
}
2026-07-29 08:29:29 +00:00
const itemsPageSize = 17 * itemsPerRow;
itemsPageSizeRef = React.useRef(itemsPageSize);
const items = [itemsPerRow];
2026-07-20 16:05:17 +00:00
const effect = React.useEffect(() => {
2026-07-29 08:29:29 +00:00
itemsPageSizeRef.current = 17 * itemsPerRow;
2026-07-20 16:05:17 +00:00
}, items);
2026-07-29 08:29:29 +00:00
return { itemsPerRow, itemsPageSize, itemsPageSizeRef };
2026-07-20 16:05:17 +00:00
};