/* Metro module 15197; source: components_native/channel_settings/ChannelSettingsPermissionsOverrideCheckbox.tsx; dependencies: [31, 27, 33, 697, 4501, 3789, 1244, 10625, 9294, 15198, 3874, 2] */ function _fun116230(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:6, offset: 0x02481d66, size: 748 bytes, params: 8, frame: 26 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = importAll(31) /* metro dependency 31 */; const value2 = require(27) /* metro dependency 27 */; const env0_3 = value2.Pressable; const env0_4 = value2.View; const env0_5 = (require(33) /* metro dependency 33 */).jsx; const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4; const md = (importDefault(697) /* metro dependency 697: native */).radii.md; const createStylesModule = require(4501) /* metro dependency 4501: createStyles */; const createStyles = createStylesModule.createStyles; object = {}; const object3 = {}; const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST; object3.backgroundColor = BACKGROUND_BASE_LOWEST; object3.borderRadius = md; const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32; object3.height = PX_32; object3.paddingVertical = PX_4; object3.paddingHorizontal = PX_4 / 2; object3.flexDirection = 'row'; object.ternaryCheckBox = object3; object.iconWrapper = {borderRadius: md - PX_4, marginHorizontal: PX_4 / 2, justifyContent: 'center', height: '100%'}; const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8; object.icon = {marginHorizontal: PX_8}; const BACKGROUND_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_FEEDBACK_CRITICAL; object.denyActive = {backgroundColor: BACKGROUND_FEEDBACK_CRITICAL}; const object4 = {}; const ICON_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_CRITICAL; object4.backgroundColor = ICON_FEEDBACK_CRITICAL; object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm - 2; object.denySelected = object4; const BACKGROUND_FEEDBACK_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_FEEDBACK_POSITIVE; object.allowActive = {backgroundColor: BACKGROUND_FEEDBACK_POSITIVE}; const ICON_FEEDBACK_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_POSITIVE; object.allowSelected = {backgroundColor: ICON_FEEDBACK_POSITIVE}; const INTERACTIVE_BACKGROUND_SELECTED = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_SELECTED; object.passthroughSelected = {backgroundColor: INTERACTIVE_BACKGROUND_SELECTED}; const INTERACTIVE_BACKGROUND_HOVER = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_HOVER; object.passthroughActive = {backgroundColor: INTERACTIVE_BACKGROUND_HOVER}; object.disabled = {opacity: 0.3}; const env0_6 = Reflect.apply(createStyles, createStylesModule, [object]); const DENY = (require(3789) /* metro dependency 3789: PermissionUtils */).DENY; object = [DENY]; const PASSTHROUGH = (require(3789) /* metro dependency 3789: PermissionUtils */).PASSTHROUGH; object[1] = PASSTHROUGH; const ALLOW = (require(3789) /* metro dependency 3789: PermissionUtils */).ALLOW; object[2] = ALLOW; value = value.memo(ChannelSettingsPermissionsOverrideCheckbox); (require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsPermissionsOverrideCheckbox.tsx'); exports.default = value; } function getAccessibilityLabel(a0) { // fn#116231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:1095, offset: 0x02482052, size: 274 bytes, params: 2, frame: 15 const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; const t = (require(1244) /* metro dependency 1244: indexNative */).t; const DENY = (require(3789) /* metro dependency 3789: PermissionUtils */).DENY; if (DENY === a0) { return intl.string(t['6639O5']); } const ALLOW = (require(3789) /* metro dependency 3789: PermissionUtils */).ALLOW; if (ALLOW === a0) { return intl.string(t.RzDfSk); } const PASSTHROUGH = (require(3789) /* metro dependency 3789: PermissionUtils */).PASSTHROUGH; if (PASSTHROUGH === a0) { return intl.string(t.ujC3ZS); } } function getIcon_116232(a0, a1, a2) { // fn#116232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:1355, offset: 0x02482164, size: 417 bytes, params: 4, frame: 19 var SlashIcon; var colors; var CheckmarkLargeBoldIcon; var DenyIcon; const DENY = (require(3789) /* metro dependency 3789: PermissionUtils */).DENY; if (DENY === a0) { DenyIcon = (require(10625) /* metro dependency 10625: DenyIcon */).DenyIcon; var denyIconProps = {size: 'sm', style: a2.icon}; colors = (importDefault(697) /* metro dependency 697: native */).colors; denyIconProps.color = a1 ? colors.WHITE : colors.ICON_FEEDBACK_CRITICAL; return ; } const ALLOW = (require(3789) /* metro dependency 3789: PermissionUtils */).ALLOW; if (ALLOW === a0) { CheckmarkLargeBoldIcon = (require(9294) /* metro dependency 9294: CheckmarkLargeBoldIcon */).CheckmarkLargeBoldIcon; var checkmarkLargeBoldIconProps = {size: 'sm', style: a2.icon}; colors = (importDefault(697) /* metro dependency 697: native */).colors; checkmarkLargeBoldIconProps.color = a1 ? colors.WHITE : colors.ICON_FEEDBACK_POSITIVE; return ; } const PASSTHROUGH = (require(3789) /* metro dependency 3789: PermissionUtils */).PASSTHROUGH; if (PASSTHROUGH === a0) { SlashIcon = (require(15198) /* metro dependency 15198: SlashIcon */).SlashIcon; var slashIconProps = {size: 'sm', style: a2.icon}; colors = (importDefault(697) /* metro dependency 697: native */).colors; slashIconProps.color = a1 ? colors.WHITE : colors.INTERACTIVE_TEXT_DEFAULT; return ; } return null; } function getPressableStyleOverrides(a0, a1, a2) { // fn#116233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:1852, offset: 0x02482305, size: 157 bytes, params: 4, frame: 16 const DENY = (require(3789) /* metro dependency 3789: PermissionUtils */).DENY; if (DENY === a0) { return a1 ? a2.denySelected : a2.denyActive; } const ALLOW = (require(3789) /* metro dependency 3789: PermissionUtils */).ALLOW; if (ALLOW === a0) { return a1 ? a2.allowSelected : a2.allowActive; } const PASSTHROUGH = (require(3789) /* metro dependency 3789: PermissionUtils */).PASSTHROUGH; if (PASSTHROUGH === a0) { return a1 ? a2.passthroughSelected : a2.passthroughActive; } } function OverrideOption({type, selected, styles, onPress}) { // fn#116234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:2110, offset: 0x024823a2, size: 163 bytes, params: 2, frame: 22 const {accessibilityRole, accessibilityState} = (require(3874) /* metro dependency 3874: useA11yRolesNative */).useRadioA11yNative({selected: selected}); return ( {getIcon_116232(type, selected, styles)} ); } function ChannelSettingsPermissionsOverrideCheckbox({value, disabled, onValueChange}) { // fn#116236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:2504, offset: 0x0248249a, size: 158 bytes, params: 2, frame: 20 disabled = !(disabled === undefined) && disabled; const styles = useStyles(); return ( {env0_7.map(_fun116237)} ); } function OverrideOptionStyle({pressed}) { // fn#116235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:2370, owner: OverrideOption.style, offset: 0x02482445, size: 85 bytes, params: 2, frame: 16 var r0; var stylesBinding; var value2; var getPressableStyleOverridesBinding; var typeBinding; var items2; let selectedBinding = selected; if (selectedBinding) { value2 = environment.__proto__; getPressableStyleOverridesBinding = getPressableStyleOverrides; typeBinding = type; selectedBinding = selected; stylesBinding = styles; items2 = [getPressableStyleOverridesBinding(typeBinding, selectedBinding, stylesBinding)]; items2[1] = stylesBinding.iconWrapper; r0 = items2; } else if (pressed) { value2 = environment.__proto__; getPressableStyleOverridesBinding = getPressableStyleOverrides; typeBinding = type; selectedBinding = selected; stylesBinding = styles; items2 = [getPressableStyleOverridesBinding(typeBinding, selectedBinding, stylesBinding)]; items2[1] = stylesBinding.iconWrapper; r0 = items2; } else { r0 = styles.iconWrapper; } return r0; } function _fun116237(a0, a1) { // fn#116237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:2736, offset: 0x02482538, size: 100 bytes, params: 3, frame: 17 const env0_0 = a0; return ( ); } function onPress_116238() { // fn#116238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:2800, offset: 0x0248259c, size: 56 bytes, params: 1, frame: 12 if (onValueChange != null && value !== env0_0) { onValueChange(env0_0); } }