100 lines
6.7 KiB
TypeScript
100 lines
6.7 KiB
TypeScript
/* Metro module 6242; source: design/components/TableRow/native/TableRowIcon.native.tsx; dependencies: [29, 31, 27, 33, 4501, 697, 4580, 2] */
|
|
import ObjectWithoutProperties from '../../../../by-id/module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
|
|
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 CreateStylesModule from '../../Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
|
|
function _fun49340(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#49340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6420:6, offset: 0x011f6835, size: 679 bytes, params: 8, frame: 23
|
|
const env0_0 = require;
|
|
const env0_3 = ['color'];
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
ReactModule;
|
|
const createStyles = CreateStylesModule.createStyles;
|
|
object = {};
|
|
const object2 = {};
|
|
let TABLE_ROW_ICON_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_ICON_SIZE;
|
|
object2.width = TABLE_ROW_ICON_SIZE;
|
|
TABLE_ROW_ICON_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_ICON_SIZE;
|
|
object2.height = TABLE_ROW_ICON_SIZE;
|
|
object2.justifyContent = 'center';
|
|
object2.alignItems = 'center';
|
|
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
|
object.container = object2;
|
|
const TABLEROW_ICON_COLOR_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TABLEROW_ICON_COLOR_DEFAULT;
|
|
object.default = {color: TABLEROW_ICON_COLOR_DEFAULT};
|
|
const TEXT_STATUS_ONLINE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_STATUS_ONLINE;
|
|
object.statusOnline = {color: TEXT_STATUS_ONLINE};
|
|
const TEXT_STATUS_IDLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_STATUS_IDLE;
|
|
object.statusIdle = {color: TEXT_STATUS_IDLE};
|
|
const TEXT_STATUS_DND = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_STATUS_DND;
|
|
object.statusDND = {color: TEXT_STATUS_DND};
|
|
const TEXT_STATUS_OFFLINE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_STATUS_OFFLINE;
|
|
object.statusOffline = {color: TEXT_STATUS_OFFLINE};
|
|
const object7 = {};
|
|
const PLATFORM_XBOX = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_XBOX;
|
|
object7.backgroundColor = PLATFORM_XBOX;
|
|
let WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
|
object7.color = WHITE;
|
|
object.xbox = object7;
|
|
const object8 = {};
|
|
const PLATFORM_PLAYSTATION = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_PLAYSTATION;
|
|
object8.backgroundColor = PLATFORM_PLAYSTATION;
|
|
WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
|
object8.color = WHITE;
|
|
object.playstation = object8;
|
|
const TEXT_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_CRITICAL;
|
|
object.danger = {color: TEXT_FEEDBACK_CRITICAL};
|
|
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
|
|
object.secondary = {color: INTERACTIVE_TEXT_DEFAULT};
|
|
WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
|
object.translucent = {color: WHITE};
|
|
const env0_7 = Reflect.apply(createStyles, CreateStylesModule, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('design/components/TableRow/native/TableRowIcon.native.tsx');
|
|
exports.TableRowIcon = TableRowIcon;
|
|
function TableRowIcon({source, IconComponent, variant}) { // fn#49341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6420:1093, offset: 0x011f6adc, size: 477 bytes, params: 2, frame: 24
|
|
variant = variant === undefined ? 'default' : variant;
|
|
const styles = useStyles();
|
|
const r5 = variant === 'default' ? styles.default : variant === 'text-status-online' ? styles.statusOnline : variant === 'text-status-idle' ? styles.statusIdle : variant === 'text-status-dnd' ? styles.statusDND : variant === 'text-status-offline' ? styles.statusOffline : variant === 'xbox' ? styles.xbox : variant === 'playstation' ? styles.playstation : variant === 'danger' ? styles.danger : variant === 'secondary' ? styles.secondary : variant !== 'translucent' ? undefined : styles.translucent;
|
|
const color = r5.color;
|
|
const value4 = ObjectWithoutProperties(r5, env0_3);
|
|
const r12 = variant === 'default' ? (require(4580) /* metro dependency 4580: Icon */).IconSizes.MEDIUM : (require(4580) /* metro dependency 4580: Icon */).IconSizes.REFRESH_SMALL_16;
|
|
const r10 = variant === 'default' || variant === 'danger' || (variant === 'secondary' || variant === 'translucent') ? 'md' : 'sm';
|
|
return (
|
|
source != null
|
|
? (
|
|
<View style={[styles.container, value4]}>
|
|
{
|
|
IconComponent != null
|
|
? (
|
|
<IconComponent size={r10} color={color} />
|
|
)
|
|
: ((Component) => <Component color={color} source={source} size={r12} />)(importDefault(4580) /* metro dependency 4580: Icon */)
|
|
}
|
|
</View>
|
|
)
|
|
: (
|
|
IconComponent == null
|
|
? null
|
|
: (
|
|
<View style={[styles.container, value4]}>
|
|
{
|
|
IconComponent != null
|
|
? (
|
|
<IconComponent size={r10} color={color} />
|
|
)
|
|
: ((Component) => <Component color={color} source={source} size={r12} />)(importDefault(4580) /* metro dependency 4580: Icon */)
|
|
}
|
|
</View>
|
|
)
|
|
)
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun49340, 6242, [29, 31, 27, 33, 4501, 697, 4580,
|
|
2]) /* metro module 6242, dependencies: [29, 31, 27, 33, 4501, 697, 4580, 2] */;
|