decord/source/modules/feedback/native/RatingSelector.tsx
github-actions ecf26fc058 chore: update source for alpha 347.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4823.js (118.4 MB)
2026-09-16 07:03:15 +00:00

115 lines
5 KiB
TypeScript

// Module ID: 11772
// Function ID: 11773
// Name: RatingSelector
// Dependencies: [19, 17, 11768, 21, 4638, 11773, 11774, 1115, 11778, 11779, 11783, 11784, 8730, 5208, 2]
// Exports: default
// Module 11772 (RatingSelector)
import _modDef11773 from "module_11773" /* 11773 */;
import _modDef11778 from "module_11778" /* 11778 */;
import _modDef11783 from "module_11783" /* 11783 */;
import noop from "module_19" /* 19 */;
const require = fn;
get_ActivityIndicator = fn(17);
({ View: c3, Image: closure_4 } = get_ActivityIndicator);
const Constants = fn(11768);
({ DEFAULT_RATINGS: hasOwnProperty, FeedbackRating: metroRequire } = Constants);
const jsx = fn(21).jsx;
let createStyles = fn(4638);
let closure_8 = createStyles.createStyles({ ratings: { flexDirection: "row", alignItems: "center", justifyContent: "center" }, rating: {}, emoji: { width: 64, height: 64, marginVertical: 24, marginHorizontal: 12 } });
createStyles = fn(4638);
let closure_9 = createStyles.createStyles({ ratings: { flexDirection: "column", alignItems: "flex-start", justifyContent: "flex-start", gap: 16, marginBottom: 12 }, rating: { width: "100%" }, emoji: { width: 32, height: 32 } });
const size = fn(2);
const result = size.fileFinishedImporting("modules/feedback/native/RatingSelector.tsx");
export default function RatingSelector(ratingOptions) {
ratingOptions = ratingOptions.ratingOptions;
if (ratingOptions === undefined) {
ratingOptions = closure_5;
}
const textLabels = ratingOptions.textLabels;
({ selectedRating: importDefault, onChangeRating: dependencyMap } = ratingOptions);
closure_3 = undefined;
let tmp2 = closure_8();
if (null != textLabels) {
tmp2 = tmp;
}
closure_3 = tmp2;
let obj = {};
let obj2 = { source: null, getLabel: null, rating: null };
let obj3 = { selected: _modDef11773, normal: null };
tmp = closure_9();
obj3.normal = textLabels(11774).useFeedbackModalSadDesaturatedSource();
obj2.source = obj3;
obj2.getLabel = function getLabel() {
const intl = textLabels(1115).intl;
return intl.string(textLabels(1115).t["C/12Tt"]);
};
obj2.rating = constants.BAD;
obj[constants.BAD] = obj2;
let obj5 = { source: null, getLabel: null, rating: null };
let obj6 = { selected: _modDef11778, normal: null };
let obj4 = textLabels(11774);
obj6.normal = textLabels(11779).useFeedbackModalNeutralDesaturatedSource();
obj5.source = obj6;
obj5.getLabel = function getLabel() {
const intl = textLabels(1115).intl;
return intl.string(textLabels(1115).t.Xcb4cF);
};
obj5.rating = constants.NEUTRAL;
obj[constants.NEUTRAL] = obj5;
const obj8 = { source: null, getLabel: null, rating: null };
const obj9 = { selected: _modDef11783, normal: null };
let obj7 = textLabels(11779);
obj9.normal = textLabels(11784).useFeedbackModalHappyDesaturatedSource();
obj8.source = obj9;
obj8.getLabel = function getLabel() {
const intl = textLabels(1115).intl;
return intl.string(textLabels(1115).t["1Vyb5J"]);
};
obj8.rating = constants.GOOD;
obj[constants.GOOD] = obj8;
closure_129_0 = obj;
const mapped = ratingOptions.map((item) => textLabels[item]);
const obj10 = textLabels(11784);
return <closure_3 style={tmp2.ratings}>{mapped.map((rating) => {
rating = rating.rating;
({ selected, normal } = rating.source);
const getLabel = rating.getLabel;
if (null != rating) {
const obj = { style: closure_3.rating, children: null };
const obj2 = { accessibilityRole: "button", accessibilityLabel: getLabel(), accessibilityState: null, onPress: null, icon: null, label: null };
const obj3 = { selected: closure_1 === rating };
obj2.accessibilityState = obj3;
obj2.onPress = function onPress() {
return dependencyMap(rating);
};
const obj4 = { style: closure_3.emoji, source: null };
if (closure_1 === rating) {
normal = selected;
}
obj4.source = normal;
obj2.icon = <closure_1_4 style={closure_3.emoji} source={null} />;
obj2.label = tmp[rating];
obj.children = jsx(textLabels(8730).RowButton, { accessibilityRole: "button", accessibilityLabel: getLabel(), accessibilityState: null, onPress: null, icon: null, label: null });
let tmp14Result = <closure_3 key={rating} style={closure_3.rating}>{null}</closure_3>;
} else {
const obj5 = { accessibilityRole: "button", accessibilityLabel: getLabel(), accessibilityState: null, onPress: null, children: null };
const obj6 = { selected: closure_1 === rating };
obj5.accessibilityState = obj6;
obj5.onPress = function onPress() {
return dependencyMap(rating);
};
const obj7 = { style: closure_3.emoji, source: null };
let tmp2 = normal;
if (closure_1 === rating) {
tmp2 = selected;
}
obj7.source = tmp2;
obj5.children = <closure_1_4 style={closure_3.emoji} source={null} />;
tmp14Result = jsx(textLabels(5208).PressableOpacity, { accessibilityRole: "button", accessibilityLabel: getLabel(), accessibilityState: null, onPress: null, children: null }, rating);
}
return tmp14Result;
})}</closure_3>;
};