33 lines
883 B
TypeScript
33 lines
883 B
TypeScript
// Metro module 13795 (f13796).
|
|
import { match, P } from "../../_bundle/Module4389";
|
|
import { NameValidationState } from "./UniqueUsernamesTypes";
|
|
import { intl, t } from "../../intl/index.native";
|
|
export function formatUsernameLiveCheckValidation(a0) {
|
|
return match(a0).with({
|
|
rateLimited: true
|
|
}, () => ({
|
|
type: NameValidationState.RATE_LIMIT,
|
|
message: intl.string(t.T15lqn)
|
|
})).with({
|
|
error: P.not(P.nullish)
|
|
}, (a0) => ({
|
|
type: NameValidationState.ERROR,
|
|
message: a0.error
|
|
})).with({
|
|
taken: false
|
|
}, () => ({
|
|
type: NameValidationState.AVAILABLE,
|
|
message: intl.string(t.PgfBSx)
|
|
})).with({
|
|
taken: true
|
|
}, () => ({
|
|
type: NameValidationState.ERROR,
|
|
message: intl.string(t.mCrAUb)
|
|
})).with({
|
|
error: P.nullish
|
|
}, () => ({
|
|
type: NameValidationState.INTERNAL_ERROR,
|
|
message: ""
|
|
})).otherwise(() => {});
|
|
}
|