/* Metro module 15197; source: components_native/channel_settings/ChannelSettingsPermissionsOverrideCheckbox.tsx; dependencies: [31, 27, 33, 697, 4501, 3789, 1244, 10625, 9294, 15198, 3874, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as PermissionUtilsModule from '../../utils/PermissionUtils.tsx'; /* Metro dependency 3789 */
import * as UseA11yRolesNativeModule from '../../external/discord_common/js/packages/design/hooks/useA11yRolesNative.tsx'; /* Metro dependency 3874 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
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 = ReactModule;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
const md = (importDefault(697) /* metro dependency 697: native */).radii.md;
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.backgroundColor = BACKGROUND_BASE_LOWEST;
object2.borderRadius = md;
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object2.height = PX_32;
object2.paddingVertical = PX_4;
object2.paddingHorizontal = PX_4 / 2;
object2.flexDirection = 'row';
object.ternaryCheckBox = object2;
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 object5 = {};
const ICON_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_CRITICAL;
object5.backgroundColor = ICON_FEEDBACK_CRITICAL;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm - 2;
object.denySelected = object5;
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 = (PermissionUtilsModule).DENY;
object = [DENY];
const PASSTHROUGH = (PermissionUtilsModule).PASSTHROUGH;
object[1] = PASSTHROUGH;
const ALLOW = (PermissionUtilsModule).ALLOW;
object[2] = ALLOW;
value = value.memo(ChannelSettingsPermissionsOverrideCheckbox);
(FileImportTrackerModule).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 = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const DENY = (PermissionUtilsModule).DENY;
if (DENY === a0) {
return intl.string(t['6639O5']);
}
const ALLOW = (PermissionUtilsModule).ALLOW;
if (ALLOW === a0) {
return intl.string(t.RzDfSk);
}
const PASSTHROUGH = (PermissionUtilsModule).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 = (PermissionUtilsModule).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 = (PermissionUtilsModule).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 = (PermissionUtilsModule).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 = (PermissionUtilsModule).DENY;
if (DENY === a0) {
return a1 ? a2.denySelected : a2.denyActive;
}
const ALLOW = (PermissionUtilsModule).ALLOW;
if (ALLOW === a0) {
return a1 ? a2.allowSelected : a2.allowActive;
}
const PASSTHROUGH = (PermissionUtilsModule).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} = (UseA11yRolesNativeModule).useRadioA11yNative({selected: selected});
return (
{getIcon_116232(type, selected, styles)}
);
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 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 _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);
}
}
}
}
}
global.__d(_fun116230, 15197, [31, 27, 33, 697, 4501, 3789, 1244, 10625, 9294, 15198, 3874,
2]) /* metro module 15197, dependencies: [31, 27, 33, 697, 4501, 3789, 1244, 10625, 9294, 15198, 3874, 2] */;