40 lines
1.8 KiB
TypeScript
40 lines
1.8 KiB
TypeScript
// Metro module 13853 (f13854).
|
|
import { useCallback } from "react";
|
|
import { View } from "react-native";
|
|
import { createStyles } from "../../../design/components/Styles/native/createStyles";
|
|
import Module712 from "../../../_bundle/Module712";
|
|
import ActionSheetActionCreators from "../../action_sheet/native/ActionSheetActionCreators";
|
|
import { BottomSheet } from "../../../design/components/Sheet/native/BottomSheet.native";
|
|
import { BottomSheetTitleHeader } from "../../../design/components/Sheet/native/BottomSheetTitleHeader.native";
|
|
import { TableRadioGroup } from "../../../design/components/TableRow/native/TableRadioGroup.native";
|
|
import { ExplicitContentRedaction } from "../../../_bundle/Module1306";
|
|
import { TableRadioRow } from "../../../design/components/TableRow/native/TableRadioRow.native";
|
|
const useStyles = createStyles({
|
|
content: {
|
|
marginTop: Module712.space.PX_24,
|
|
paddingHorizontal: Module712.space.PX_16
|
|
}
|
|
});
|
|
export default function ExplicitMediaSettingsActionSheet(props) {
|
|
const { title, subtitle, options } = props;
|
|
let currentValue = props.currentValue;
|
|
const styles = useStyles();
|
|
const callback = useCallback((c27580_0) => {
|
|
const r7 = options.find((option) => option.value === c27580_0);
|
|
if (r7 != null) {
|
|
r7.onPress();
|
|
ActionSheetActionCreators.hideActionSheet();
|
|
}
|
|
}, [options]);
|
|
const r28 = [<BottomSheetTitleHeader title={title} subtitle={subtitle} />, ,];
|
|
if (currentValue == null) {
|
|
currentValue = ExplicitContentRedaction.SHOW;
|
|
}
|
|
r28[1] = <View style={styles.content}>
|
|
<TableRadioGroup defaultValue={currentValue} onChange={callback} hasIcons={false}>
|
|
{options.map((option) => <TableRadioRow key={option.value} label={option.label} value={option.value} />)}
|
|
</TableRadioGroup>
|
|
</View>;
|
|
return <BottomSheet startExpanded>{r28}</BottomSheet>;
|
|
};
|