decord/source/modules/media_keyboard/native/useMediaKeyboardItemsPerRow.tsx
github-actions 7450227d0b chore: update source for alpha 345.4
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9596_m.js (380.6 MB)
2026-09-04 17:41:35 +00:00

38 lines
1.3 KiB
TypeScript

// Module ID: 10576
// Function ID: 10577
// Name: useMediaKeyboardItemsPerRow
// Dependencies: [19, 4339, 2]
// Exports: useMediaKeyboardItemsPerRow
// Module 10576 (useMediaKeyboardItemsPerRow)
import closure_3 from "noop" /* 19 */;
const require = arg1;
const result = require("set").fileFinishedImporting("modules/media_keyboard/native/useMediaKeyboardItemsPerRow.tsx");
export const useMediaKeyboardItemsPerRow = function useMediaKeyboardItemsPerRow() {
const tmp2 = itemsPageSizeRef(4339)();
let itemsPerRow = 8;
if (itemsPerRow(4339).WindowSizeClassifier.XLARGE !== tmp2) {
itemsPerRow = 6;
if (tmp3(4339).WindowSizeClassifier.LARGE !== tmp2) {
itemsPerRow = 4;
if (tmp3(4339).WindowSizeClassifier.NORMAL !== tmp2) {
itemsPerRow = 3;
if (tmp3(4339).WindowSizeClassifier.SMALL !== tmp2) {
const _Error = Error;
const _HermesInternal = HermesInternal;
error = new Error("Unknown window size classifier: " + tmp2);
throw error;
}
}
}
}
const itemsPageSize = 17 * itemsPerRow;
itemsPageSizeRef = React.useRef(itemsPageSize);
const items = [itemsPerRow];
const effect = React.useEffect(() => {
itemsPageSizeRef.current = 17 * itemsPerRow;
}, items);
return { itemsPerRow, itemsPageSize, itemsPageSizeRef };
};