decord/source/modules/feedback/native/RatingSelector.tsx

131 lines
5 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 10854
// Function ID: 10855
2026-07-20 16:05:17 +00:00
// Name: RatingSelector
2026-08-24 06:08:38 +00:00
// Dependencies: [19, 17, 10850, 21, 4668, 10855, 10856, 1236, 10860, 10861, 10865, 10866, 8125, 5438, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 10854 (RatingSelector)
import noopAll from "noop" /* 19 */;
import registerAssetDefault from "registerAsset" /* 10855 */;
import registerAssetDefault2 from "registerAsset" /* 10860 */;
import registerAssetDefault3 from "registerAsset" /* 10865 */;
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
import FeedbackRating from "FeedbackRating" /* 10850 */;
import { jsx } from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4668 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-24 06:08:38 +00:00
noopAll;
2026-07-29 08:29:29 +00:00
({ View: c3, Image: c4 } = get_ActivityIndicator);
({ DEFAULT_RATINGS: c5, FeedbackRating: closure_6 } = FeedbackRating);
let closure_8 = createCacheKey.createStyles({ ratings: { flexDirection: "row", alignItems: "center", justifyContent: "center" }, rating: {}, emoji: { width: 64, height: 64, marginVertical: 24, marginHorizontal: 12 } });
let closure_9 = createCacheKey.createStyles({ ratings: { flexDirection: "column", alignItems: "flex-start", justifyContent: "flex-start", gap: 16, marginBottom: 12 }, rating: { width: "100%" }, emoji: { width: 32, height: 32 } });
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/feedback/native/RatingSelector.tsx");
2026-07-20 16:05:17 +00:00
export default function RatingSelector(ratingOptions) {
ratingOptions = ratingOptions.ratingOptions;
if (ratingOptions === undefined) {
ratingOptions = closure_5;
}
const textLabels = ratingOptions.textLabels;
2026-07-29 08:29:29 +00:00
let obj = textLabels;
2026-07-23 10:11:24 +00:00
({ selectedRating: importDefault, onChangeRating: dependencyMap } = ratingOptions);
2026-08-24 06:08:38 +00:00
closure_3 = undefined;
2026-07-23 10:11:24 +00:00
let tmp2 = callback();
2026-07-20 16:05:17 +00:00
if (null != textLabels) {
tmp2 = tmp;
}
2026-08-24 06:08:38 +00:00
closure_3 = tmp2;
2026-07-29 08:29:29 +00:00
obj = undefined;
obj = {};
obj = { source: null, getLabel: null, rating: null };
2026-08-24 06:08:38 +00:00
obj = { selected: registerAssetDefault, normal: null };
let obj3 = obj(10856);
2026-07-29 08:29:29 +00:00
obj[1] = obj3.useFeedbackModalSadDesaturatedSource();
obj[0] = obj;
obj[1] = function getLabel() {
const intl = obj(1236).intl;
return intl.string(obj(1236).t["C/12Tt"]);
};
obj[2] = constants.BAD;
obj[constants.BAD] = obj;
2026-08-24 06:08:38 +00:00
obj1 = { source: null, getLabel: null, rating: null };
let obj2 = { selected: registerAssetDefault2, normal: null };
2026-07-23 10:11:24 +00:00
tmp = callback2();
2026-08-24 06:08:38 +00:00
obj2[1] = obj(10861).useFeedbackModalNeutralDesaturatedSource();
2026-07-29 08:29:29 +00:00
obj1[0] = obj2;
obj1[1] = function getLabel() {
const intl = obj(1236).intl;
return intl.string(obj(1236).t.Xcb4cF);
};
obj1[2] = constants.NEUTRAL;
obj[constants.NEUTRAL] = obj1;
obj3 = { source: null, getLabel: null, rating: null };
2026-08-24 06:08:38 +00:00
let obj4 = { selected: registerAssetDefault3, normal: null };
const obj7 = obj(10861);
obj4[1] = obj(10866).useFeedbackModalHappyDesaturatedSource();
2026-07-29 08:29:29 +00:00
obj3[0] = obj4;
obj3[1] = function getLabel() {
const intl = obj(1236).intl;
return intl.string(obj(1236).t["1Vyb5J"]);
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
obj3[2] = constants.GOOD;
obj[constants.GOOD] = obj3;
const mapped = ratingOptions.map((arg0) => obj[arg0]);
2026-08-24 06:08:38 +00:00
const obj10 = obj(10866);
return <closure_3 style={tmp2.ratings}>{mapped.map((rating) => {
2026-07-23 10:11:24 +00:00
rating = rating.rating;
({ selected, normal } = rating.source);
const getLabel = rating.getLabel;
if (null != rating) {
2026-08-24 06:08:38 +00:00
obj = { style: null, children: null };
obj[0] = closure_3.rating;
2026-07-29 08:29:29 +00:00
obj = { accessibilityRole: "button", accessibilityLabel: null, accessibilityState: null, onPress: null, icon: null, label: null };
obj[1] = getLabel();
obj = { selected: null };
obj[0] = closure_1 === rating;
obj[2] = obj;
obj[3] = function onPress() {
2026-08-24 06:08:38 +00:00
return closure_1_2(rating);
2026-07-23 10:11:24 +00:00
};
2026-08-24 06:08:38 +00:00
obj1 = { style: null, source: null };
obj1[0] = closure_3.emoji;
2026-07-23 10:11:24 +00:00
if (closure_1 === rating) {
normal = selected;
}
2026-07-29 08:29:29 +00:00
obj1[1] = normal;
2026-08-24 06:08:38 +00:00
obj[4] = closure_1_7(closure_1_4, obj1);
2026-07-29 08:29:29 +00:00
obj[5] = tmp[rating];
2026-08-24 06:08:38 +00:00
obj[1] = closure_1_7(obj(closure_1_2[12]).RowButton, obj);
let tmp14Result = closure_1_7(closure_3, obj, rating);
const tmp12 = closure_1_7;
const tmp13 = closure_1_4;
const tmp4 = closure_1_7;
const tmp5 = closure_3;
const tmp7 = closure_1_7;
2026-07-23 10:11:24 +00:00
} else {
2026-07-29 08:29:29 +00:00
const obj2 = { accessibilityRole: "button", accessibilityLabel: null, accessibilityState: null, onPress: null, children: null };
obj2[1] = getLabel();
const obj3 = { selected: null };
obj3[0] = closure_1 === rating;
obj2[2] = obj3;
obj2[3] = function onPress() {
2026-08-24 06:08:38 +00:00
return closure_1_2(rating);
2026-07-23 10:11:24 +00:00
};
2026-07-29 08:29:29 +00:00
const obj4 = { style: null, source: null };
2026-08-24 06:08:38 +00:00
obj4[0] = closure_3.emoji;
2026-07-29 08:29:29 +00:00
let tmp2 = normal;
2026-07-23 10:11:24 +00:00
if (closure_1 === rating) {
2026-07-29 08:29:29 +00:00
tmp2 = selected;
2026-07-23 10:11:24 +00:00
}
2026-07-29 08:29:29 +00:00
obj4[1] = tmp2;
2026-08-24 06:08:38 +00:00
obj2[4] = closure_1_7(closure_1_4, obj4);
tmp14Result = closure_1_7(obj(closure_1_2[13]).PressableOpacity, obj2, rating);
const tmp14 = closure_1_7;
const tmp19 = closure_1_7;
const tmp20 = closure_1_4;
2026-07-23 10:11:24 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp14Result;
2026-08-24 06:08:38 +00:00
})}</closure_3>;
2026-07-20 16:05:17 +00:00
};