124 lines
6.5 KiB
TypeScript
124 lines
6.5 KiB
TypeScript
/* Metro module 12104; source: design/void/IconButton/native/IconButton.tsx; dependencies: [31, 33, 4501, 697, 6235, 5278, 1305, 2] */
|
|
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
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 CreateStylesModule from '../../../components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
import * as PressablesModule from '../../Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
|
|
import * as LegacyTokensModule from '../../../migrations/native/LegacyTokens.tsx'; /* Metro dependency 6235 */
|
|
|
|
function _fun92954(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12290:6, offset: 0x0209fcc3, size: 491 bytes, params: 8, frame: 25
|
|
const env0_0 = require;
|
|
const SquareIconButton2 = SquareIconButton;
|
|
const CircularIconButton2 = CircularIconButton;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
object = {SMALL_24: 24};
|
|
object[24] = 'SMALL_24';
|
|
object.MEDIUM_32 = 32;
|
|
object[32] = 'MEDIUM_32';
|
|
object.LARGE_40 = 40;
|
|
object[40] = 'LARGE_40';
|
|
const createStyles = CreateStylesModule.createStyles;
|
|
const object2 = {};
|
|
const object3 = {'borderRadius': null, 'alignItems': 'center', 'justifyContent': 'center'};
|
|
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
|
const DARK_PRIMARY_700_LIGHT_PRIMARY_230 = (LegacyTokensModule).DARK_PRIMARY_700_LIGHT_PRIMARY_230;
|
|
object3.backgroundColor = DARK_PRIMARY_700_LIGHT_PRIMARY_230;
|
|
object2.container = object3;
|
|
const object4 = {};
|
|
let SMALL_24 = object.SMALL_24;
|
|
object4.height = SMALL_24;
|
|
SMALL_24 = object.SMALL_24;
|
|
object4.width = SMALL_24;
|
|
object2.small = object4;
|
|
const object5 = {};
|
|
let MEDIUM_32 = object.MEDIUM_32;
|
|
object5.height = MEDIUM_32;
|
|
MEDIUM_32 = object.MEDIUM_32;
|
|
object5.width = MEDIUM_32;
|
|
object2.medium = object5;
|
|
const object6 = {};
|
|
let LARGE_40 = object.LARGE_40;
|
|
object6.height = LARGE_40;
|
|
LARGE_40 = object.LARGE_40;
|
|
object6.width = LARGE_40;
|
|
object2.large = object6;
|
|
SMALL_24 = object.SMALL_24;
|
|
object2.smallCircular = {borderRadius: SMALL_24 / 2};
|
|
MEDIUM_32 = object.MEDIUM_32;
|
|
object2.mediumCircular = {borderRadius: MEDIUM_32 / 2};
|
|
LARGE_40 = object.LARGE_40;
|
|
object2.largeCircular = {borderRadius: LARGE_40 / 2};
|
|
const DARK_PRIMARY_300_LIGHT_PRIMARY_500 = (LegacyTokensModule).DARK_PRIMARY_300_LIGHT_PRIMARY_500;
|
|
object2.icon = {tintColor: DARK_PRIMARY_300_LIGHT_PRIMARY_500};
|
|
const env0_5 = Reflect.apply(createStyles, CreateStylesModule, [object2]);
|
|
SquareIconButton2.Sizes = object;
|
|
CircularIconButton2.Sizes = object;
|
|
(FileImportTrackerModule).fileFinishedImporting('design/void/IconButton/native/IconButton.tsx');
|
|
exports.SquareIconButton = SquareIconButton2;
|
|
exports.CircularIconButton = CircularIconButton2;
|
|
function SquareIconButton({onPress, source, style, iconStyle, size, disableColor, accessibilityLabel, accessibilityHidden, disabled}) { // fn#92955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12290:728, offset: 0x0209feae, size: 370 bytes, params: 2, frame: 27
|
|
const styles = useStyles();
|
|
const value3 = ReactModule.useMemo(_fun92956, [size, styles]);
|
|
const PressableOpacity = (PressablesModule).PressableOpacity;
|
|
const r15 = accessibilityHidden ? undefined : accessibilityLabel;
|
|
const items2 = [styles.container, style, value3];
|
|
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
|
const LARGE_40 = env0_4.LARGE_40;
|
|
return (
|
|
<PressableOpacity
|
|
accessibilityRole="button"
|
|
accessibilityLabel={r15}
|
|
accessibilityElementsHidden={accessibilityHidden}
|
|
onPress={onPress}
|
|
disabled={disabled}
|
|
style={items2}
|
|
>
|
|
<Icon
|
|
size={size === LARGE_40 ? (require(1305) /* metro dependency 1305: native */).Icon.Sizes.MEDIUM : (require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16}
|
|
style={[disableColor ? null : styles.icon, iconStyle]}
|
|
disableColor={disableColor}
|
|
source={source}
|
|
/>
|
|
</PressableOpacity>
|
|
);
|
|
function _fun92956() { // fn#92956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12290:895, offset: 0x020a0020, size: 84 bytes, params: 1, frame: 4
|
|
const sizeBinding = size;
|
|
const MEDIUM_32 = env1_4.MEDIUM_32;
|
|
if (MEDIUM_32 === sizeBinding) {
|
|
return styles.medium;
|
|
}
|
|
const LARGE_40 = env1_4.LARGE_40;
|
|
if (LARGE_40 === sizeBinding) {
|
|
return styles.large;
|
|
}
|
|
env1_4.SMALL_24;
|
|
return styles.small;
|
|
}
|
|
|
|
}
|
|
|
|
function CircularIconButton(a0) { // fn#92957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12290:1349, offset: 0x020a0074, size: 190 bytes, params: 2, frame: 21
|
|
const style = a0.style;
|
|
const size = a0.size;
|
|
const disableColor = a0.disableColor;
|
|
const object = {'style': 0, 'size': 0, 'disableColor': 0};
|
|
silentSetPrototypeOf(object, null, undefined);
|
|
const value = copyDataProperties({}, a0, object, undefined);
|
|
const value3 = undefined;
|
|
const styles = useStyles();
|
|
const object2 = {};
|
|
const SMALL_24 = env0_4.SMALL_24;
|
|
object2.style = [SMALL_24 === size ? styles.smallCircular : env0_4.MEDIUM_32 === size ? styles.mediumCircular : env0_4.LARGE_40 !== size ? value3 : styles.largeCircular,
|
|
style];
|
|
object2.size = size;
|
|
copyDataProperties(object2, value, object);
|
|
object2['disableColor'] = disableColor;
|
|
return <SquareIconButton {...object2} />;
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun92954, 12104, [31, 33, 4501, 697, 6235, 5278, 1305,
|
|
2]) /* metro module 12104, dependencies: [31, 33, 4501, 697, 6235, 5278, 1305, 2] */;
|