decord/source/design/components/Pile/native/Pile.native.tsx

142 lines
4.4 KiB
TypeScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 9869
2026-07-27 11:26:19 +00:00
// Function ID: 76469
2026-07-20 16:05:17 +00:00
// Name: Pile
2026-07-25 08:10:48 +00:00
// Dependencies: [31, 27, 33, 4131, 1327, 22, 7909, 9870, 2]
2026-07-20 16:05:17 +00:00
// Exports: Pile
2026-07-25 08:10:48 +00:00
// Module 9869 (Pile)
2026-07-23 10:11:24 +00:00
import result from "result";
import { View } from "get ActivityIndicator";
import { jsx } from "jsxProd";
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose";
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
const require = arg1;
let closure_6 = _createForOfIteratorHelperLoose.createStyles({ pile: { flexDirection: "row" } });
let result = require("jsxProd").fileFinishedImporting("design/components/Pile/native/Pile.native.tsx");
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
export const Pile = function Pile(aria_label) {
let View;
2026-07-20 16:05:17 +00:00
let children;
2026-07-23 10:11:24 +00:00
let result;
let dependencyMap;
let require;
2026-07-20 16:05:17 +00:00
let size;
2026-07-23 10:11:24 +00:00
({ shape: require, size } = aria_label);
({ gap: dependencyMap, depthX: result, depthY: View, children } = aria_label);
2026-07-20 16:05:17 +00:00
let Children = React.Children;
const tmp = callback();
2026-07-23 10:11:24 +00:00
const length = Children.toArray(children).filter(require(1327) /* isDiscordFrontendDevelopment */.isNotNullish).length;
let obj = require(22) /* apply */;
2026-07-20 16:05:17 +00:00
if (obj.isArray(size)) {
if (size.length !== length) {
const _Error = Error;
const error = new Error("Pile: size array must have the same number of elements as children");
throw error;
}
}
obj = {
style: tmp.pile,
accessible: true,
2026-07-23 10:11:24 +00:00
"aria-label": aria_label["aria-label"],
2026-07-20 16:05:17 +00:00
children: Children.map(children, (type) => {
2026-07-23 10:11:24 +00:00
if (outer1_3.isValidElement(type)) {
let obj = outer1_0(outer1_2[5]);
2026-07-20 16:05:17 +00:00
const tmp6 = obj.isArray(size) ? size[arg1] : size;
let tmp8;
if (arg1 < length - 1) {
2026-07-23 10:11:24 +00:00
let obj1 = outer1_0(outer1_2[5]);
2026-07-20 16:05:17 +00:00
if (obj1.isArray(size)) {
let tmp13 = tmp12[arg1 + 1];
} else {
tmp13 = tmp12;
}
2026-07-23 10:11:24 +00:00
if (outer1_0(outer1_2[6]).CutoutShape.Circle === closure_0) {
obj = { shape: closure_0 };
if (null == result) {
2026-07-20 16:05:17 +00:00
let result = -closure_2;
} else {
2026-07-23 10:11:24 +00:00
result = tmp6 * (1 - result);
2026-07-20 16:05:17 +00:00
}
obj.x = result;
if (null == closure_4) {
let result1 = -closure_2;
} else {
result1 = tmp6 * (1 - closure_4);
}
obj.y = result1;
obj.size = tmp13 + 2 * closure_2;
2026-07-23 10:11:24 +00:00
} else if (outer1_0(outer1_2[6]).CutoutShape.RoundedRect === tmp14) {
obj = { shape: closure_0 };
if (null == result) {
2026-07-20 16:05:17 +00:00
let result2 = -closure_2;
} else {
2026-07-23 10:11:24 +00:00
result2 = tmp6 * (1 - result);
2026-07-20 16:05:17 +00:00
}
obj.x = result2;
if (null == closure_4) {
let result3 = -closure_2;
} else {
result3 = tmp6 * (1 - closure_4);
}
obj.y = result3;
obj.width = tmp13 + 2 * closure_2;
obj.height = tmp13 + 2 * closure_2;
obj.cornerRadius = tmp13 / 3 + closure_2;
tmp8 = obj;
} else {
2026-07-23 10:11:24 +00:00
let obj2 = outer1_0(outer1_2[4]);
obj2.assertNever(closure_0);
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
tmp14 = closure_0;
2026-07-20 16:05:17 +00:00
}
let num9 = 0;
let num10 = 0;
if (arg1 > 0) {
2026-07-23 10:11:24 +00:00
let obj5 = outer1_0(outer1_2[5]);
2026-07-20 16:05:17 +00:00
if (obj5.isArray(size)) {
let tmp48 = tmp47[arg1 - 1];
} else {
tmp48 = tmp47;
}
2026-07-23 10:11:24 +00:00
if (null == result) {
2026-07-20 16:05:17 +00:00
let sum = -tmp48;
} else {
2026-07-23 10:11:24 +00:00
sum = -tmp48 * result + closure_2;
2026-07-20 16:05:17 +00:00
}
let num11 = 0;
if (null != closure_4) {
num11 = arg1 * (tmp48 - tmp48 * closure_4 + closure_2);
}
num10 = num11;
num9 = sum;
}
obj1 = {};
obj2 = { height: tmp6, marginLeft: num9, marginTop: num10 };
const items = [obj2, ];
2026-07-23 10:11:24 +00:00
if (type.type === outer1_0(outer1_2[7]).PileOverflow) {
2026-07-20 16:05:17 +00:00
const obj3 = { minWidth: tmp6 };
let obj4 = obj3;
} else {
obj4 = { width: tmp6 };
}
items[1] = obj4;
obj1.style = items;
let tmp62 = type;
if (null != tmp8) {
obj5 = {};
const items1 = [tmp8];
obj5.cutouts = items1;
obj5.children = type;
2026-07-23 10:11:24 +00:00
tmp62 = length(size(outer1_2[6]), obj5);
2026-07-20 16:05:17 +00:00
}
obj1.children = tmp62;
2026-07-23 10:11:24 +00:00
return length(outer1_4, obj1, arg1);
2026-07-20 16:05:17 +00:00
} else {
return null;
}
})
};
Children = React.Children;
2026-07-23 10:11:24 +00:00
return length(View, obj);
2026-07-20 16:05:17 +00:00
};