// Module ID: 12356 // Function ID: 12357 // Name: UserProfileApplicationWidgetBottomProgressLayout // Dependencies: [19, 17, 21, 4285, 712, 12265, 12353, 4281, 2] // Exports: default // Module 12356 (UserProfileApplicationWidgetBottomProgressLayout) import "noop"; import get_ActivityIndicator from "get ActivityIndicator"; import jsxProd from "jsxProd"; import createCacheKey from "createCacheKey"; let c3; let c4; let c5; let obj1; const require = arg1; ({ Image: obj1, View: c3 } = get_ActivityIndicator); ({ jsx: c4, jsxs: c5 } = jsxProd); createCacheKey = { root: null, image: null, content: null, progressContainer: null, progress: null, textContent: null, textLeft: null, progressText: null }; createCacheKey = { flexDirection: "row", alignItems: "center", gap: require("Themes").space.PX_12 }; createCacheKey[0] = createCacheKey; createCacheKey[1] = { width: 48, height: 48, borderRadius: require("Themes").radii.sm, overflow: "hidden", borderWidth: 1, borderColor: require("Themes").colors.BORDER_SUBTLE, backgroundColor: require("Themes").colors.BACKGROUND_MOD_SUBTLE }; obj1 = { width: 48, height: 48, borderRadius: require("Themes").radii.sm, overflow: "hidden", borderWidth: 1, borderColor: require("Themes").colors.BORDER_SUBTLE, backgroundColor: require("Themes").colors.BACKGROUND_MOD_SUBTLE }; createCacheKey[2] = { flex: 1, gap: require("Themes").space.PX_4, minWidth: 0 }; let obj2 = { flex: 1, gap: require("Themes").space.PX_4, minWidth: 0 }; createCacheKey[3] = { width: "100%", height: 6, borderRadius: require("Themes").radii.md, backgroundColor: require("Themes").colors.BACKGROUND_MOD_SUBTLE }; let obj3 = { width: "100%", height: 6, borderRadius: require("Themes").radii.md, backgroundColor: require("Themes").colors.BACKGROUND_MOD_SUBTLE }; createCacheKey[4] = { height: 6, borderRadius: require("Themes").radii.md, backgroundColor: require("Themes").colors.ICON_STRONG }; let obj4 = { height: 6, borderRadius: require("Themes").radii.md, backgroundColor: require("Themes").colors.ICON_STRONG }; createCacheKey[5] = { flexDirection: "row", justifyContent: "space-between", gap: require("Themes").space.PX_4 }; createCacheKey[6] = { flex: 1, minWidth: 0 }; createCacheKey[7] = { flexShrink: 0 }; createCacheKey = createCacheKey.createStyles(createCacheKey); let obj5 = { flexDirection: "row", justifyContent: "space-between", gap: require("Themes").space.PX_4 }; const result = require("jsxProd").fileFinishedImporting("modules/application_widget/native/UserProfileApplicationWidgetBottomProgressLayout.tsx"); export default function UserProfileApplicationWidgetBottomProgressLayout(arg0) { let bottomConfig; let resolveFieldValue; ({ bottomConfig, resolveFieldValue } = arg0); const tmp = createCacheKey(); const objective = bottomConfig.components.objective; let image; if (objective != null) { image = objective.fields.image; } const items = [require(12265) /* resolvedValuesFromUserApplicationIdentityProfile */.ResolvedValueType.MEDIA]; const fieldValue = resolveFieldValue(image, items); let obj = require(12265) /* resolvedValuesFromUserApplicationIdentityProfile */; const singleStringOrSkeleton = obj.resolveSingleStringOrSkeleton(objective, "name", resolveFieldValue); let obj1 = require(12265) /* resolvedValuesFromUserApplicationIdentityProfile */; const singleStringOrSkeleton1 = obj1.resolveSingleStringOrSkeleton(objective, "description", resolveFieldValue); const progress = bottomConfig.components.progress; let current; if (progress != null) { current = progress.fields.current; } const items1 = [require(12265) /* resolvedValuesFromUserApplicationIdentityProfile */.ResolvedValueType.NUMBER]; let iter = resolveFieldValue(current, items1); let max; if (progress != null) { max = progress.fields.max; } const items2 = [require(12265) /* resolvedValuesFromUserApplicationIdentityProfile */.ResolvedValueType.NUMBER]; let iter2 = resolveFieldValue(max, items2); let tmp3Result = tmp3(12265); obj = { style: tmp.root, children: null }; const progressPercentage = tmp3Result.resolveProgressPercentage(iter, iter2); if (null != fieldValue) { obj = { source: null, style: null, resizeMode: "contain" }; obj1 = { uri: null }; obj1[0] = fieldValue.media.url; obj[0] = obj1; obj[1] = tmp.image; let tmp14 = callback(closure_2, obj); let tmp15 = callback; } else { const obj2 = { style: null }; obj2[0] = tmp.image; tmp14 = callback(tmp3(12353).ImageSkeleton, obj2); tmp15 = callback; } const items3 = [tmp14, ]; const obj3 = { style: tmp.content, children: null }; const obj4 = { style: tmp.progressContainer, accessibilityRole: "progressbar", accessibilityValue: null, children: null }; let num; if (iter2 != null) { num = iter2.value; } if (num == null) { num = 1; } const obj5 = { min: 0, max: num, now: null }; let num2; if (iter != null) { num2 = iter.value; } if (num2 == null) { num2 = 0; } obj5[2] = num2; obj4[2] = obj5; const obj6 = { style: null }; const items4 = [tmp.progress, ]; let str = globalThis; items4[1] = { width: "" + progressPercentage + "%" }; obj6[0] = items4; obj4[3] = tmp15(closure_3, obj6); const items5 = [tmp15(closure_3, obj4), ]; const obj8 = { style: tmp.textContent, children: null }; const obj9 = { style: tmp.textLeft, children: null }; if ("value" === singleStringOrSkeleton.status) { const obj10 = { variant: "heading-sm/medium", lineClamp: 2, children: null }; obj10[2] = singleStringOrSkeleton.text; let tmp15Result = tmp15(tmp3(4281).Text, obj10); } else { tmp15Result = tmp15(tmp3(12353).TextSkeleton, { variant: "heading-sm/medium" }); } const items6 = [tmp15Result, ]; if ("value" === singleStringOrSkeleton1.status) { const obj11 = { variant: "text-xs/medium", color: "text-subtle", lineClamp: 2, children: null }; obj11[3] = singleStringOrSkeleton1.text; tmp15Result = tmp15(tmp3(4281).Text, obj11); } else { tmp15Result = tmp15(tmp3(12353).TextSkeleton, { variant: "text-xs/medium" }); } items6[1] = tmp15Result; obj9[1] = items6; const items7 = [closure_5(closure_3, obj9), ]; if (null != iter) { const obj12 = { variant: "text-sm/medium", lineClamp: 1, style: null, children: null }; obj12[2] = tmp.progressText; if (null != iter2) { iter = iter2.value; iter2 = str.HermesInternal.concat; str = "/"; let iter2Result = iter2(iter.value, "/", iter); } else { tmp3Result = tmp3(12265); const _HermesInternal = HermesInternal; iter2Result = "" + tmp3Result.decimalToClampedPercentage(iter.value) + "%"; } obj12[3] = iter2Result; tmp15(tmp3(4281).Text, obj12); } else { items7[1] = tmp15(tmp3(12353).TextSkeleton, { variant: "text-sm/medium", widthChars: 4 }); obj8[1] = items7; items5[1] = tmp11(tmp12, obj8); obj3[1] = items5; items3[1] = tmp11(tmp12, obj3); obj[1] = items3; return tmp11(tmp12, obj); } };