85 lines
4.0 KiB
TypeScript
85 lines
4.0 KiB
TypeScript
/* Metro module 11535; source: modules/channel/useTextareaPlaceholderAndLabels.tsx; dependencies: [661, 4805, 1244, 2] */
|
|
function _fun88355(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11721:6, offset: 0x01fe03f2, size: 134 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
|
const env0_3 = constantsModule.ChannelTypes;
|
|
const env0_4 = constantsModule.ChannelTypesSets;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/useTextareaPlaceholderAndLabels.tsx');
|
|
exports.default = useTextareaPlaceholderAndLabels;
|
|
}
|
|
|
|
function useTextareaPlaceholderAndLabels({channel, isReadonly, isCreatingThread}) { // fn#88356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11721:239, offset: 0x01fe0478, size: 1058 bytes, params: 2, frame: 23
|
|
var r0;
|
|
var THREADS;
|
|
var object2;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
var string;
|
|
var YzpScd;
|
|
var MKDeyL;
|
|
isReadonly = !(isReadonly === undefined) && isReadonly;
|
|
isCreatingThread = !(isCreatingThread === undefined) && isCreatingThread;
|
|
const value2 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel, true);
|
|
const value3 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel, false);
|
|
if (channel == null) {
|
|
object2 = {};
|
|
string = intl.string;
|
|
MKDeyL = t.MKDeyL;
|
|
object2.placeholder = Reflect.apply(string, intl, [MKDeyL]);
|
|
string = intl.string;
|
|
MKDeyL = t.MKDeyL;
|
|
object2.accessibilityLabel = Reflect.apply(string, intl, [MKDeyL]);
|
|
r0 = object2;
|
|
} else if (value2 == null) {
|
|
object2 = {};
|
|
string = intl.string;
|
|
MKDeyL = t.MKDeyL;
|
|
object2.placeholder = Reflect.apply(string, intl, [MKDeyL]);
|
|
string = intl.string;
|
|
MKDeyL = t.MKDeyL;
|
|
object2.accessibilityLabel = Reflect.apply(string, intl, [MKDeyL]);
|
|
r0 = object2;
|
|
} else if (isCreatingThread) {
|
|
object2 = {};
|
|
string = intl.string;
|
|
YzpScd = t.YzpScd;
|
|
object2.placeholder = Reflect.apply(string, intl, [YzpScd]);
|
|
string = intl.string;
|
|
YzpScd = t.YzpScd;
|
|
object2.accessibilityLabel = Reflect.apply(string, intl, [YzpScd]);
|
|
r0 = object2;
|
|
} else if (isReadonly) {
|
|
object2 = {};
|
|
object2.placeholder = intl.string(t['RRvRp/']);
|
|
object2.accessibilityLabel = intl.string(t['RRvRp/']);
|
|
r0 = object2;
|
|
} else if (channel.isForumPost()) {
|
|
object2 = {};
|
|
object2.placeholder = intl.formatToPlainString(t.Y6qWLc, {channel: value2});
|
|
object2.accessibilityLabel = intl.formatToPlainString(t.KffKoR, {channel: value3});
|
|
r0 = object2;
|
|
} else {
|
|
THREADS = ChannelTypesSets.THREADS;
|
|
if (THREADS.has(channel.type)) {
|
|
object2 = {};
|
|
object2.placeholder = intl.formatToPlainString(t['8lzR/R'], {channel: value2});
|
|
object2.accessibilityLabel = intl.formatToPlainString(t.UZIMWS, {channel: value3});
|
|
r0 = object2;
|
|
} else if (channel.type === ChannelTypes.DM) {
|
|
object2 = {};
|
|
object2.placeholder = intl.formatToPlainString(t['4c+CAx'], {channel: value2});
|
|
object2.accessibilityLabel = intl.formatToPlainString(t.fqOxbV, {channel: value3});
|
|
r0 = object2;
|
|
} else {
|
|
object2 = {};
|
|
object2.placeholder = intl.formatToPlainString(t['8lzR/R'], {channel: value2});
|
|
object2.accessibilityLabel = intl.formatToPlainString(t.ih7ZSA, {channel: value3});
|
|
r0 = object2;
|
|
}
|
|
}
|
|
return r0;
|
|
}
|
|
|